Created
February 14, 2016 18:04
-
-
Save erajanraja24/095acc8883e56bbf0439 to your computer and use it in GitHub Desktop.
Getting the product details
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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