我复制了 Google 的搜索结果,现在想将其粘贴到 Excel 上。
我能够将其写入在 IE 中搜索的位置,但不明白更多内容。
Sub get()
With CreateObject("InternetExplorer.application")
.Visible = True
.navigate ("http://www.google.com/")
While .Busy Or .readyState <> 4
DoEvents
Wend
.document.all.q.Value = "keyword"
.document.all.btnG.Click
End With
End Sub
最佳答案
通过手动浏览搜索页面以外的其他方式使用 Google(目前)违反了他们的 Terms of Service (强调我的):
5.3 You agree not to access (or attempt to access) any of the Services by any means other than through the interface that is provided by Google, unless you have been specifically allowed to do so in a separate agreement with Google. You specifically agree not to access (or attempt to access) any of the Services through any automated means (including use of scripts or web crawlers) and shall ensure that you comply with the instructions set out in any robots.txt file present on the Services.
我知道这并不能解决您眼前的问题。
关于vba - 如何在Excel VBA中使用Google的搜索结果?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/881502/