A very simple Python package that scrapes the Vinted website to retrieve information about its items.
Project description
Vinted Scraper
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
Usage
The package offers two functions:
- The
searchfunction gets all the items present on the listing page - The
get_itemfunction gets more information about an item, and its seller present on the item detail page.
If you want to parse and manage the scraped data directly you can use the
rawfunctions.
Here's the two-way of how to use the package:
Structured Data
To obtain the scraped data as a vinted_scraper.VintedItem, so you can:
import vinted_scraper
def main():
params = {
"search_text": "board games"
# Add other query parameters like the pagination and so on
}
items = vinted_scraper.search("https://www.vinted.com/catalog", params) # get all the items
item = items[0] # get the first Item of the list
vinted_scraper.get_item(item.url) # get more info about a particular product
if __name__ == "__main__":
main()
Structured Data are parsed and converted into a
vinted_scraper.VintedItemobject. If some attributes areNonemeans that it wasn't found in the scrap. Also, I discard some attribute that I thought was useless.
Raw Data
To obtain the scraped data as a Dict, so you can:
import vinted_scraper
def main():
params = {
"search_text": "board games"
# Add other query parameters like the pagination and so on
}
items = vinted_scraper.raw_search("https://www.vinted.com/catalog", params) # get all the items
item = items[0] # get the first Item of the list
vinted_scraper.get_raw_item(item["url"]) # get more info about the item
if __name__ == "__main__":
main()
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-1.1.2.tar.gz.
File metadata
- Download URL: vinted_scraper-1.1.2.tar.gz
- Upload date:
- Size: 16.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6f53cb3473d57a6ca59daa0979843a0a63f00ca2cd3c98509be636b89cdee25
|
|
| MD5 |
ba7df9dd83b8aac45a836deacefc10cc
|
|
| BLAKE2b-256 |
9d397bfa5a68abdd83eecd3aef92401707159de92e405e786257ab44e700c5eb
|
File details
Details for the file vinted_scraper-1.1.2-py3-none-any.whl.
File metadata
- Download URL: vinted_scraper-1.1.2-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc4a297eb8022e54820f51457ec494658b3aecd1d4237ae177279364f76c7e97
|
|
| MD5 |
1d5804a4a55e36f0940bec80f8f1154f
|
|
| BLAKE2b-256 |
54039e869738bd6ec3c51616a176f739f9458c5990fbff64468207e7d99da3b8
|