We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bd95e83 + 26b8a44 commit d3dcf05Copy full SHA for d3dcf05
amazon/tools.py
@@ -16,7 +16,7 @@ def get_asin(url: str):
16
if re.search(r'^[A-Z0-9]{10}$', url):
17
return url
18
# Extract ASIN from URL searching for alphanumeric and 10 digits
19
- have_asin = re.search(r'(dp|gp/product|gp/aw/d)/([a-zA-Z0-9]{10})', url)
+ have_asin = re.search(r'(dp|gp/product|gp/aw/d|dp/product)/([a-zA-Z0-9]{10})', url)
20
return have_asin.group(2) if have_asin else None
21
22
0 commit comments