我尝试使用VBScript从https://coinmarketcap.com/中提取比特币的价格。 我有以下HTML代码:
<td class="no-wrap text-right" data-sort="4329.6071152">
<a class="price" href="/currencies/bitcoin/#markets" data-btc="1.0" data-usd="4329.6071152">$4,329.61</a>
</td>
所以我为vbs文件编写了这个脚本:
set objIE =nothing
Set objIE = CreateObject("InternetExplorer.Application")
objIE.Visible = false
objIE.Navigate "https://coinmarketcap.com/"
Do
WScript.Sleep 100
Loop Until objIE.ReadyState = 4
msgbox objIE.document.getElementsByTagName("/currencies/bitcoin/#markets")
objIE.Quit()