Skip to content
Advertisement

Tag: screen-scraping

scrape ASIN from amazon URL using javascript

Assuming I have an Amazon product URL like so How could I scrape just the ASIN using javascript? Thanks! Answer Amazon’s detail pages can have several forms, so to be thorough you should check for them all. These are all equivalent: http://www.amazon.com/Kindle-Wireless-Reading-Display-Generation/dp/B0015T963C http://www.amazon.com/dp/B0015T963C http://www.amazon.com/gp/product/B0015T963C http://www.amazon.com/gp/product/glance/B0015T963C They always look like either this or this: This should do it:

Advertisement