Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

have additional fallback using amazon product advertising api for amazon links #2

Open
krthush opened this issue Sep 9, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@krthush
Copy link
Owner

krthush commented Sep 9, 2021

see https://webservices.amazon.com/paapi5/documentation/

amazon id "can" be obtain from link, but can be tricky since doesn't seem like there is a consistent structure?

for example here the id is B0140RDK8W but both of the following links work

https://www.amazon.com/gp/product/B0140RDK8W

https://www.amazon.com/dp/B0140RDK8W

@krthush krthush added the enhancement New feature or request label Sep 9, 2021
@krthush
Copy link
Owner Author

krthush commented Sep 9, 2021

https://stackoverflow.com/questions/21700573/get-asin-from-pasted-amazon-url seems to have some "easier" solutions

@krthush
Copy link
Owner Author

krthush commented Sep 9, 2021

following regex works for the supported urls list

(?:dp|o|gp|-|gp\/product|\/ASIN|gp\/offer-listing|gp\/product\/images|gp\/aw\/d)\/(B[0-9]{2}[0-9A-Z]{7}|[0-9]{9}(?:X|[0-9]))

excluding the following 2 urls

http://www.amzn.com/*

http://amzn.com/*

@krthush
Copy link
Owner Author

krthush commented Sep 9, 2021

implemented setup with 6df1800 and 8151be1, now waiting for registration from amazon associates, until further work can be done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant