adamlwgriffiths / amazon_scraper

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

make trailing slash in _extract_asin_regexp optional #24

Closed yaph closed 8 years ago

yaph commented 8 years ago

Calling the lookup method with a URL like 'http://www.amazon.com/dp/B0051QVF7A' fails because the regular expression expects a slash after the ASIN. The test url works on Amazon and is not redirected.

I ran the tests locally and the test results are the same before and after the change including failures and errors: FAILED (failures=9, errors=7, skipped=10)

As far as I can tell the change did not introduce errors.

adamlwgriffiths commented 8 years ago

Technically the /? is not required since the asin match will match up to the / [^/], but this is trivial.

Once upon a time, those tests all completed, but Amazon constantly change and break their pages, so they should be ok to ignore. Although it's still not good to have failing tests, I don't have the time to fix them.

Thanks for the fix, I'm surprised it wasn't raised as an issue earlier.