Skip to content

Instantly share code, notes, and snippets.

@erajanraja24
Created February 14, 2016 18:04
Show Gist options
  • Save erajanraja24/095acc8883e56bbf0439 to your computer and use it in GitHub Desktop.
Save erajanraja24/095acc8883e56bbf0439 to your computer and use it in GitHub Desktop.
Getting the product details
Sub asinfetch()
Dim driver As New FirefoxDriver
driver.Get "http://www.amazon.com/gp/product/B00MFY3GB4", 20000
driver.Window.Maximize
Set proe = driver.FindElementById("detail-bullets")
Set cla = proe.FindElementByClass("content")
Set li = cla.FindElementsByTag("li")
For Each lis In li
If InStr(lis.Text, "UPC:") Then
Debug.Print lis.Text
End If
If InStr(lis.Text, "Average Customer Review:") Then
Debug.Print lis.Text
End If
If InStr(lis.Text, "Average Customer Review:") Then
Debug.Print lis.Text
End If
Next
'Set give = cla.FindElementByClass("a-icon-alt")
ThisWorkbook.Sheets(1).Cells(1, 1) = cla.Text
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment