我正在做的是这样的:
- 加载 www.google.com
- 在输入框中输入内容以搜索 Google.com
- 然后在文本文件中检索 google 提供的链接。
我尝试了下面的脚本,但它没有返回 Google 提供的“链接”:
Set ie = CreateObject("InternetExplorer.Application")
ie.Visible = TRUE
ie.Navigate("https://www.google.co.in/#hl=en&output=search&sclient=psy- ab&q=my+sa+fria&oq=my+sa+fria&gs_l=hp.3...136.425.0.1178.5.4.0.0.0.2.318.916.0j2j1j1.4.0.les%3B..0.0...1c.1.5.psy-ab.ILEhJPZdulQ&pbx=1&bav=on.2,or.r_gc.r_pw.r_cp.r_qf.&bvm=bv.43148975,d.bmk&fp=aceecfc5e1faf854&biw=1366&bih=487")
Do until ie.ReadyState = 4
WScript.Sleep 50
Loop
set urls = ie.document.all.tags("a")
For x = 0 to (urls.length)-1
wscript.echo urls(x).innerHTML & " : " & urls(x).href
Next
wscript.echo "Number of URLs:", urls.length, vbNewline