question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

help euro € price problem amazon letters: & n b s p ;

See original GitHub issue

I read about change Dockerfile but with euro there is a problem on amazon France Italy Germany and all the country with euro€value: The price contain strange characters 19,99 € example: <span id="price_inside_buybox" class="a-size-medium a-color-price"> 19,99&nbsp;€ </span>

And the program tells me that it’s not able to convert in float the string of the price.

I edited en_US.UTF-8 to it_IT.UTF-8 or fr or gr but it didn’t work.

Someone managed to make it work with € ? Thanks

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:21

github_iconTop GitHub Comments

2reactions
Pipodicommented, Dec 7, 2020

If you are not in a hurry to grab yourself some GPUs (believe me, I wish I could have bought a 3080 FE when I had a chance), I suggest you to wait until @EricJMarti implements the internationalization framework. But if you want I can fork the repo and “maintain” an ad-hoc solution.

2reactions
Pipodicommented, Dec 6, 2020

It’s not that simple. The locale must be changed to it_IT.UTF-8, yes, but you need to change some code too. I’m no Python expert, but I currently have a Docker container scaping Amazon for 2080 that are currently on stock and I’m receiving the notifications on my Discord server.

You have to remove the &nbsp; HTML entity using html.unescape() (I’ve added it to the price_str in common.py file). Then you have to change strings corresponding to “add to cart” to “aggiungi al carrello” in some parts of the code.

After that, re-build the container and create your config. I’ve tested it on Amazon.it only, I’ll try and test it on other domains tomorrow if I have some spare time, but it should work for every Euro country. But you have to translate every string in every language you want to scrape.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Not working with Uk amazon · Issue #43 · EricJMarti/inventory ...
When using this with uk amazon it says: unable to convert "£140.45" to float... caught ... help euro € price problem amazon letters:...
Read more >
Currency Issues - URGENT - Help for New Sellers
Hello, We have set up a European sellers account, our online store is UK based and ... the price is fixed in Euro's...
Read more >
European Gas Steadies With Weather, Asian Competition in ...
European natural gas steadied, with traders focusing on weather forecasts, ... Some LNG tankers head off to Asia as European prices fell.
Read more >
Tiwari, A: Advanced Molecularly Imprinting Materials ... - Amazon
Kindle Edition €149.80 Read with Our Free App; Hardcover €209.28 ... of Chemistry,  Ankara,Turkey and Associate Editor of Advanced Materials Letters.
Read more >
Car Rental Mas Blau | Avis Rent a Car
Para obter todos os benefícios da Avis e da Amazon, após fazer login na ...   Based on our last review, this vehicle...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found