We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4456494 commit 0dc182dCopy full SHA for 0dc182d
1 file changed
amazon/paapi.py
@@ -57,7 +57,7 @@ def get_asin(url):
57
Returns:
58
string: Product ASIN. None if ASIN not found.
59
"""
60
- if re.search("[A-Z0-9]{10}", url):
+ if re.search("^[A-Z0-9]{10}$", url):
61
return url
62
# since asin is alphanumeric and 10 digit
63
have_asin = re.search(r"(dp|gp/product)/([a-zA-Z0-9]{10})", url)
0 commit comments