【发布时间】:2018-07-01 02:56:29
【问题描述】:
我希望在这里得到一些帮助。我正在尝试自动从网站下载文件,这需要我点击每次搜索的链接。
这里是链接 html 信息:
(a class="icon-xls-export" href="/us/products/239505/ishares-us-consumer-goods-etf/1395165510754.ajax?fileType=csv&fileName=IYK_holdings&dataType=fund" onclick="s_objectID="https://www.ishares.com/us/products/239505/ishares-us-consumer-goods-etf/1395165510754.ajax?fileT_1";return this.s_oc?this.s_oc(e):true">
Detailed Holdings and Analytics </a)
这是我的代码:
Sub Navigate_Web()
For Each Cell In Range("A1:A1") 'location of ticker symbol
Dim IE As New InternetExplorer
IE.Visible = True
IE.Navigate "https://www.ishares.com/us/products/239505/" & Cell.Value & "?referrer=tickerSearch"
Do
DoEvents
Loop Until IE.readyState = READYSTATE_COMPLETE
Set objInputs = IE.document.getElementsByclassname("icon-xls-export")
Next Cell
End Sub
我可以打开网站没问题,但我一直收到错误消息,对象不支持此属性或方法。
所以这里的任何帮助都会很棒!
提前致谢!
【问题讨论】:
标签: vba