Skip to main content

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

Project description

Vinted Scraper

Package Version Python Version codecov License FOSSA Status

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.

FOSSA Status

Project 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.4.0.tar.gz (27.0 kB view details)

Uploaded Source

Built Distribution

vinted_scraper-2.4.0-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vinted_scraper-2.4.0.tar.gz
  • Upload date:
  • Size: 27.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for vinted_scraper-2.4.0.tar.gz
Algorithm Hash digest
SHA256 4605ae077474abf45fc8aebc068add77416100c265a14bbbb1eda17a7ef0b35b
MD5 23bef3c9ea86b52a0020dcf0b693a18f
BLAKE2b-256 83ee22d3b231a9f5499d7fac507ffe9296c4136ebba23d2255d1037b4e5f06e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for vinted_scraper-2.4.0.tar.gz:

Publisher: release.yml on Giglium/vinted_scraper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for vinted_scraper-2.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bc285fc13bdcf714b57c770e5a9e84c25a14216ce08339d8ccd78134a4404602
MD5 865324e012474f618c1ba0082e71ba5f
BLAKE2b-256 e7f5701973d9f5cc595f3ca8f00b47dded133f63cf5fbb4acece5e8539a90929

See more details on using hashes here.

Provenance

The following attestation bundles were made for vinted_scraper-2.4.0-py3-none-any.whl:

Publisher: release.yml on Giglium/vinted_scraper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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