Giglium / vinted_scraper

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

Correct usage of search parameters #45

Closed Bebio95 closed 6 months ago

Bebio95 commented 6 months ago

Hello, you mentioned the following in the search section : Add other query parameters like the pagination and so on

That sounds interesting but I am a bit confused of what would the syntax look like to add a parameter (e.g. add a criteria on a minimum user rating or a list of specific brands..)

If you could just add a quick example to clarify, it would be very helpful.

Thanks

Giglium commented 6 months ago

HI, the syntax is straightforward, you have a dict and you have to populate it with the params

params = {
        "search_text": "board games"
        "page": 2 # example for pagination
    }

Let me know if this is clear or I will update the REAMDE.md.

If you want to know more about how the parameters work, it's a more complex matter. To figure out all the params and how they work is hard, since we don't know how Vinted manages its params.

For example, if I add "catalog": 2321 I will filter all the search results by the board games category. How do I figure out this? I check the URL after I add the filters that I want on the search page.

If for example, you want to find criteria on the user rating you should retro-engineering the search page on Vinted to understand how they do it.

Bebio95 commented 6 months ago

Ok, that's clear enough. Thanks a lot