Created
April 18, 2018 20:54
-
-
Save timothycarambat/21e45d53dc1e51e415ee798b56e2f629 to your computer and use it in GitHub Desktop.
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
Public Function ASIN_LOOKUP(asin As String) As String | |
Set objIE = CreateObject("InternetExplorer.Application") | |
objIE.Top = 0 | |
objIE.Left = 0 | |
objIE.Width = 800 | |
objIE.Height = 600 | |
objIE.Visible = False | |
objIE.Navigate ("https://www.amazon.com/s?field-keywords=" + asin) | |
Do | |
DoEvents | |
Loop Until objIE.readystate = 4 | |
ASIN_LOOKUP = objIE.document.getElementsByClassName("a-offscreen")(0).innerText | |
End Function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This will take a string ASIN in some column by itself only. It will then output the search result from amazon for that ASIN.
NOTE:
This scrapes and queries the search result page and not the item itself since URL generation for a specific item is not easily done without nesting URL scraping. It may return a price range that can then be split or a single cost as a string. It requires no API registration and is liable to break as Amazon updates their UI.