Skip to content

Commit d3dcf05

Browse files
authored
Merge pull request #66 from barbax7/master
Update get_asin for new link type
2 parents bd95e83 + 26b8a44 commit d3dcf05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

amazon/tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def get_asin(url: str):
1616
if re.search(r'^[A-Z0-9]{10}$', url):
1717
return url
1818
# 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)
19+
have_asin = re.search(r'(dp|gp/product|gp/aw/d|dp/product)/([a-zA-Z0-9]{10})', url)
2020
return have_asin.group(2) if have_asin else None
2121

2222

0 commit comments

Comments
 (0)