Skip to main content

Vinted Scraper

Package Version Python Version License

A very simple Python package that scrapes the Vinted site to retrieve information about its items.

Installation

You can install Vinted Scraper using pip:

    pip install vinted_scraper

If you are on Python 3.6 you also have to install dataclasses: pip install dataclasses

Functions

The package offers the following functions:

search - (gets all the items present on the listing page)

Parameters

name type data type description
params optional Dict Query parameters like the pagination and so on
item - (gets the information about an item, and its seller present on the item detail page)

Parameters

name type data type description
id required str The unique identifier of the item to retrieve
params optional Dict I don't know is they exist

Usage

To obtain the scraped data as a vinted_scraper.models.VintedItem, so you can:

import vinted_scraper.VintedScraper


def main():
    scraper = VintedScraper("https://www.vinted.com")  # init the scraper with the baseurl
    params = {
        "search_text": "board games"
        # Add other query parameters like the pagination and so on
    }
    items = scraper.search(params)  # get all the items
    item = items[0]  # get the first Item of the list
    scraper.item(item.id)  # get more info about a particular item


if __name__ == "__main__":
    main()

VintedScraper returns structured data that are parsed and converted into a vinted_scraper.models.VintedItem object. If some attributes are None means that it wasn't found in the response, maybe because they are returned from other API. Also, I discard some attribute that I thought was useless but feel free to open an issue or a PR to add them.

If you want to manage the JSON response directly, you should use the VintedWrapper object instead of VintedScraper.

Here's the way of how to use it:

import vinted_scraper.VintedWrapper


def main():
    wrapper = VintedWrapper("https://www.vinted.com")  # init the scraper with the baseurl
    params = {
        "search_text": "board games"
        # Add other query parameters like the pagination and so on
    }
    items = wrapper.search(params)  # get all the items
    item = items["items"][0]  # get the first Item of the list
    wrapper.item(item["id"])  # get more info about a particular item


if __name__ == "__main__":
    main()

License

This project is licensed under the MIT License - see the LICENSE file for details.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vinted_scraper-2.0.1.tar.gz (22.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vinted_scraper-2.0.1-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file vinted_scraper-2.0.1.tar.gz.

File metadata

  • Download URL: vinted_scraper-2.0.1.tar.gz
  • Upload date:
  • Size: 22.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for vinted_scraper-2.0.1.tar.gz
Algorithm Hash digest
SHA256 b2b879a0b5c48c5aafa5dcb8d5f2070f31c32f00eaaecb90dab990b97935fa4a
MD5 84207f20eb5dd499c5747066cc648128
BLAKE2b-256 932416359e2c1fbc90a9b55185e9c6be827e1fd07b8ca2d191e075b2a8ba65bd

See more details on using hashes here.

File details

Details for the file vinted_scraper-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: vinted_scraper-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for vinted_scraper-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b7c0b5083a93b7819bfee33feaa1290f0affa969561701b9b0b49ab0342b285d
MD5 a2c616636e17c341c809bef3b67c0200
BLAKE2b-256 b80534a5247c1c9c31a0c3070952254c1a52418b38a8b33e7261aa4ba74c1c0b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page