我想用https从网站上抓取表格。我想要处理未来合约细节的表格(合约,到期,手数,价格,NRML保证金,IS保证金)
我编写了这段代码来获取该网站的表格,但它显示了两个错误。
1)函数错误(type,msg,asError = TRUE): 无法连接到零端口80:拒绝连接
2)警告消息:XML内容似乎不是XML: ' https://zerodha.com/margin-calculator/Futures/'
library(XML)
library(RCurl)
zero='https://zerodha.com/margin-calculator/Futures/'
zero<-getURL("zero")
#Error in function (type, msg, asError = TRUE) :
# Failed to connect to zero port 80: Connection refused
zero.table=readHTMLTable(zero)
#Warning message:
#XML content does not seem to be XML: 'https://zerodha.com/margin-calculator/Futures/'
答案 0 :(得分:0)
我会使用for (int i = 0; i < lbs.length; i++) {
Label label = new Label();
label.setOnMouseEntered(new EventHandler<MouseEvent>() {
@Override
public void handle(MouseEvent e) {
label.setStyle("-fx-background-color:BLACK;");
}
});
lbs[i] = label;
}
httr