A very simple Python package for scraping Vinted. Supports both synchronous and asynchronous operations with automatic cookie management and typed responses.
Project description
Vinted Scraper
A very simple Python package for scraping Vinted. Supports both synchronous and asynchronous operations with automatic cookie management and typed responses.
📖 Full Documentation | 💡 Examples | 📝 Changelog
Installation
Install using pip:
pip install vinted_scraper
Functions
The package offers the following methods:
search - Gets all items from the listing page based on search parameters.
Parameters
name type data type description params optional Dict Query parameters like the pagination and so on
Returns: List[VintedItem] (VintedScraper) or Dict[str, Any] (VintedWrapper)
item - Gets detailed information about a specific item and its seller.
It returns a 403 error after a few uses. See #58).
Parameters
name type data type description id required str The unique identifier of the item to retrieve params optional Dict I don't know if they exist
Returns: VintedItem (VintedScraper) or Dict[str, Any] (VintedWrapper)
curl - Perform an HTTP GET request to the given endpoint.
Parameters
name type data type description endpoint required str The endpoint to make the request to params optional Dict Query parameters like the pagination and so on
Returns: VintedJsonModel (VintedScraper) or Dict[str, Any] (VintedWrapper)
Usage
from vinted_scraper import VintedScraper
scraper = VintedScraper("https://www.vinted.com")
items = scraper.search({"search_text": "board games"})
for item in items:
print(f"{item.title} - {item.price}")
Check out the examples for more!
Debugging
To enable debug logging for troubleshooting:
import logging
# Configure logging BEFORE importing vinted_scraper
logging.basicConfig(
level=logging.DEBUG,
format="%(levelname)s:%(name)s:%(message)s"
)
from vinted_scraper import VintedScraper
scraper = VintedScraper("https://www.vinted.com")
scraper.search({"search_text": "board games"})
Debug output (click to expand)
DEBUG:vinted_scraper._vinted_wrapper:Initializing VintedScraper(baseurl=https://www.vinted.com, user_agent=None, session_cookie=auto-fetch, config=None)
DEBUG:vinted_scraper._vinted_wrapper:Refreshing session cookie
DEBUG:vinted_scraper._vinted_wrapper:Cookie fetch attempt 1/3
DEBUG:vinted_scraper._vinted_wrapper:Session cookie fetched successfully: eyJraWQiOiJFNTdZZHJ1...
DEBUG:vinted_scraper._vinted_wrapper:Calling search() with params: {'search_text': 'board games'}
DEBUG:vinted_scraper._vinted_wrapper:API Request: GET /api/v2/catalog/items with params {'search_text': 'board games'}
DEBUG:vinted_scraper._vinted_wrapper:API Response: /api/v2/catalog/items - Status: 200
Common Issues
-
403 Forbidden Error: The
item()method frequently return 403 errors (#58). -
Cookie Fetch Failed: If cookies cannot be fetched:
- Verify the base URL is correct
- Check your internet connection, some VPN are banned. Try manually getting the cookie by running the following:
curl -v -c - -L "<base-url>" | grep access_token_web
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vinted_scraper-3.0.0.tar.gz.
File metadata
- Download URL: vinted_scraper-3.0.0.tar.gz
- Upload date:
- Size: 14.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5bdf06cd7395606c48e80bfa4c21cde7da12d5f280f7d5debd1cd24f9f71562
|
|
| MD5 |
ad216831723e71d9de9773d4373f4ed7
|
|
| BLAKE2b-256 |
01524bdd318bdeee20f53fb9b010b9998998c8c27a1c2e587012618e09a348ac
|
Provenance
The following attestation bundles were made for vinted_scraper-3.0.0.tar.gz:
Publisher:
release.yml on Giglium/vinted_scraper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vinted_scraper-3.0.0.tar.gz -
Subject digest:
d5bdf06cd7395606c48e80bfa4c21cde7da12d5f280f7d5debd1cd24f9f71562 - Sigstore transparency entry: 962586939
- Sigstore integration time:
-
Permalink:
Giglium/vinted_scraper@f51452ef01d15866c3add8f732ebd109cc1a6c3c -
Branch / Tag:
refs/tags/3.0.0 - Owner: https://github.com/Giglium
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f51452ef01d15866c3add8f732ebd109cc1a6c3c -
Trigger Event:
push
-
Statement type:
File details
Details for the file vinted_scraper-3.0.0-py3-none-any.whl.
File metadata
- Download URL: vinted_scraper-3.0.0-py3-none-any.whl
- Upload date:
- Size: 25.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d5dab1a62752af0c2ba125381acc0cdc0d2019e100dfc85f94dc603321e8680
|
|
| MD5 |
5d8cfaf4be9ef17d7fc6d85ad8e20675
|
|
| BLAKE2b-256 |
158a83d024d42ad64b3d2cea938aca02701e9bcdd167f446f52634e842d9bdb6
|
Provenance
The following attestation bundles were made for vinted_scraper-3.0.0-py3-none-any.whl:
Publisher:
release.yml on Giglium/vinted_scraper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vinted_scraper-3.0.0-py3-none-any.whl -
Subject digest:
5d5dab1a62752af0c2ba125381acc0cdc0d2019e100dfc85f94dc603321e8680 - Sigstore transparency entry: 962586943
- Sigstore integration time:
-
Permalink:
Giglium/vinted_scraper@f51452ef01d15866c3add8f732ebd109cc1a6c3c -
Branch / Tag:
refs/tags/3.0.0 - Owner: https://github.com/Giglium
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f51452ef01d15866c3add8f732ebd109cc1a6c3c -
Trigger Event:
push
-
Statement type: