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

Allow to use custom amazon host to handle specific languages products #3

Merged
merged 4 commits into from Jan 27, 2020
Merged

Allow to use custom amazon host to handle specific languages products #3

merged 4 commits into from Jan 27, 2020

Conversation

gpenverne
Copy link
Contributor

@gpenverne gpenverne commented Jan 20, 2020

This PR adds an optional parameter to specifiy a specific amazon domain (my goal was to scrap products in french):

bin/cli.js products -k "drone" -H "www.amazon.fr"

@gpenverne gpenverne marked this pull request as ready for review Jan 20, 2020
@gpenverne gpenverne requested a review from drawrowfly Jan 20, 2020
@drawrowfly
Copy link
Owner

@drawrowfly drawrowfly commented Jan 24, 2020

Good stuff, but there will be issue with the output data. For example USD prices are showed with dots 49.99 but other currencies as EUR and etc with commas 49,99

We need to update regex to [^D+0-9.,]

Another example:

If you will set host to co.jp there are different values in Price tag again, with current code, price will be empty, we need to add something like that

let priceSearch = $(div[data-asin=${key}] span[data-a-size="l"])[0] || $(div[data-asin=${key}] span[data-a-size="m"])[0];

@drawrowfly
Copy link
Owner

@drawrowfly drawrowfly commented Jan 24, 2020

I just pushed update with mentioned above fixes. You can remove console.log and we can merge

@gpenverne
Copy link
Contributor Author

@gpenverne gpenverne commented Jan 24, 2020

I updated my branch. But which console.log have I to remove ?

@drawrowfly drawrowfly merged commit dfde114 into drawrowfly:master Jan 27, 2020
@gpenverne gpenverne deleted the handle-specific-country-amazon-products branch Jan 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants