Giglium / vinted_scraper

A very simple Python package that scrapes the Vinted website to retrieve information about its items.
MIT License
19 stars 5 forks source link

can't get goods in the right geolocation #34

Closed Hundred-Killer closed 7 months ago

Hundred-Killer commented 11 months ago

When receiving goods from vinted.cz I receive all goods except Czech, why is this so? Even using Czech proxy

Giglium commented 11 months ago

I've tried with this code:

import vinted_scraper.VintedWrapper

def main():
  scraper = VintedScraper("https://www.vinted.cz")
  params = {"search_text": "board games"}
  items = scraper.search(params)
  if len(items) > 0:
      print(scraper.item(items[0].id).url)

if __name__ == "__main__":
  main()

I receive a Czech item: https://www.vinted.cz/items/3923549076-mate-sk-znam-nko. But, it isn't the first item on the catalog page on the website, that is https://www.vinted.cz/items/3890484544-activity-compact-polska. This is quite strange.

I've also noticed that the Czech catalog is full of other countries items, probably because they have few items from Czech people. It's my supposition.

Since the board games keyword seems to contain some Czech items can you try with it?

Hundred-Killer commented 10 months ago

I get the wrong geolocation items if I set order=newest_first parametr. But I need to get the latest products of the right geolocation, how can I solve this?

Giglium commented 10 months ago

Sorry, but I found no localization filter in the query parameters.

Relax594 commented 9 months ago

Vinted has shared regions. For example PL, CZ, RO, DK and more share the same catalog of items. Same goes for ES, FR, IT, ... Only DE, UK and US have their own region.

So you can't filter the items before, you need to do it after scraping.