在我的日常任务中,我目前必须搜索大量产品并收集有关这些产品的信息。所以我的想法是在 google 上搜索产品,并通过从产品标题部分提取数据来从第一个搜索结果中获取信息,并且几乎对许多产品进行循环。
到目前为止,这是我的代码:
Sub SkuAutomation()
Dim ie As Object
'Navigates to google
Set ie = CreateObject("InternetExplorer.application")
ie.Visible = True
ie.Navigate "https://google.co.uk/search?q=" & Worksheets("sheet1").Cell(9, 4).Value & " " & Worksheets("sheet1").Cells(9, 2)
'Waits for page to load before next action
Do While ie.ReadyState <> READYSTATE_COMPLETE
Loop
End Sub
Run Code Online (Sandbox Code Playgroud)
我只想添加一段代码,要么点击谷歌返回的第一个链接,要么为我返回链接。我的想法是从该页面的产品标题部分抓取数据!不过还是非常早期的阶段。
我只是一个初学者,所以任何类型的帮助都将不胜感激!提前谢谢了。