DrankRock / CMScrape

A simple python CardMarket price scraper.
17 stars 3 forks source link

sellerCountry in CSV #1

Closed ninox360 closed 1 year ago

ninox360 commented 1 year ago

Added sellerCountry column to CSV in order to fix issues when scraping multiple parameters. Added another column when scraping page without parameters.

When trying to scrape a link like this https://www.cardmarket.com/de/Pokemon/Products/Singles/Fossil/Haunter-V1-FO6?language=3&minCondition=4&isFirstEd=N the columns in the CSV are messed up because there is one missing, which is sellerCountry.

A link without parameters like this https://www.cardmarket.com/de/Pokemon/Products/Singles/Neo-Destiny/Shining-Charizard-NDE107 seems to work fine, but is in fact missing a column. This is why the multiplier of the "None" string in scrapers.py has to be increased from 9 to 10. After the prices there are 10 parameters.

On the first screenshot you can see that the second record is off. minCondition should be "4" and not "None". isSigned should be "None" and not "4" and so on. On the second screenshot you can see the output with the fixed version.

Bildschirm­foto 2023-01-09 um 16 08 59 Bildschirm­foto 2023-01-09 um 16 15 43
DrankRock commented 1 year ago

That's absolutely correct, I have not touched this part in a while, my apologies, and thanks a lot !

ninox360 commented 1 year ago

Thank you for this amazing tool!