adamlwgriffiths / amazon_scraper

Provides content not accessible through the standard Amazon API
Other
234 stars 60 forks source link

extract_asin doesn't work with all Amazon's links #18

Closed apapillon closed 9 years ago

apapillon commented 9 years ago

On Amazon home page, the product link are different and extract_asin doesn't work. I propose you to change _extract_asin_regexp by (/dp/|/gp/product/)(?P<asin>[^/]+)/

#_extract_asin_regexp = re.compile(r'/dp/(?P<asin>[^/]+)/')
_extract_asin_regexp = re.compile(r'(/dp/|/gp/product/)(?P<asin>[^/]+)/')

Example of link : http://www.amazon.com/gp/product/B00GBHZDY4/

adamlwgriffiths commented 9 years ago

Thanks for raising the issue and fixing it =) I've added you as a collaborator.