Coder Social home page Coder Social logo

gertje823 / vinted-scraper Goto Github PK

View Code? Open in Web Editor NEW
83.0 10.0 19.0 105 KB

This is a tool to scrape/download images and data from Vinted & Depop using the API and stores the data in a SQLite database.

License: GNU General Public License v3.0

Python 100.00%
vinted scraper python3 python datascraping downloader sqlite sqlite3 database depop

vinted-scraper's Introduction

Vinted-Scraper

This is a tool to download images and scrape data from Vinted & Depop and store it in a SQLite database.

-- Currently working on version 2.0 (WIP) --

How to use

  1. Download/clone this repo
  2. Download the dependencies using pip install -r requirements.txt
  3. run the script python scraper.py

Vinted

Put the user IDs of the accounts in the users.txt and run the script. The script will download all the images and put it in the downloads folder. The data will be stored in the SQLite database.

Depop

Put the usernames of the accounts in the users.txt and run the script with -d. The script will download all the images and videos and put it in the downloads folder. The data will be stored in the SQLite database.

Arguments

-p [Vinted] scrape all images from your private messages. (requires -s to login and -u to set your userid)
-s "your_vinted_fr_session" [Vinted] to login to your account. how to get sessionid?
-u [Vinted] set your userid
-n [Depop] Disable file download (Only scrape product info)
-g [Depop] Also download sold items
-b [Depop] Start from a specific item. (example: python3 scraper.py -d -n -b "coose-navy-lee-sweatshirt-amazing-lee")

Example:

Download all images from private messages from your Vinted account
python scraper.py -p -u 123456789 -s "RS9KcmE1THMxV3NlclRsbEVRdU52ZVp4UG.......ASFe26"

Data that will be scraped

All the images of the products of the users will be downloaded. The avatar of the user will also be downloaded.

All the info will be stored in the sqlite db in the following tables:

Vinted Users

Username
User_id
Gender
Given_item_count
Taken_item_count
Followers_count
Following_count
Positive_feedback_count
Negative_feedback_count
Feedback_reputation
Avatar
Created_at
Last_loged_on_ts
City_id
City
Country_title
Verification_email
Verification_facebook
Verification_google
Verification_phone

Vinted Products

ID
User_id
Gender
Category
Size
State
Brand
Colors
Price
Images
Description
Title
Platform

Depop Users

Username
User_id
Bio
first_name
followers
following
initials
items_sold
last_name
last_seen
Avatar
reviews_rating
reviews_total
verified
website

Depop Products

ID
Sold
User_id
Gender
Category
Size
State
Brand
Colors
Price
Image
Description
Title
Platform
Address
discountedPriceAmount
dateUpdated

If you have any feature requests don't hesitate to open an issue :)

Disclaimer

This script is designed for educational purposes only. It is intended to demonstrate web scraping techniques and should not be used for any commercial or personal gain. Please note that using this software may violate the terms of service of Vinted and Depop websites, and you assume all responsibility for any consequences that may arise from its use. The creator of this script will not be held responsible for any damages, injuries, or losses that occur while using the software. Use at your own risk.

vinted-scraper's People

Contributors

factoffer66 avatar gertje823 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vinted-scraper's Issues

name 'r' is not defined

Error message is as follows:
Traceback (most recent call last):
File "D:\Downloads\Vinted-Scraper-main\Vinted-Scraper-main\scraper.py", line 546, in
download_depop_data(userids)
File "D:\Downloads\Vinted-Scraper-main\Vinted-Scraper-main\scraper.py", line 418, in download_depop_data
elif r.status_code == 429:
NameError: name 'r' is not defined

Depop issues.

When running with -d on the latest release.

Traceback (most recent call last):
File "D:\Lol\Vinted-Scraper-main\scraper.py", line 566, in download_depop_data
Category = product_data['group']
~~~~~~~~~~~~^^^^^^^^^
KeyError: 'group'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\Lol\Vinted-Scraper-main\scraper.py", line 716, in
download_depop_data(userids)
File "D:\Lol\Vinted-Scraper-main\scraper.py", line 568, in download_depop_data
Category = product_data['categoryId']
~~~~~~~~~~~~^^^^^^^^^^^^^^
KeyError: 'categoryId'


When running with -d -g

Traceback (most recent call last):
File "D:\Lol\Vinted-Scraper-main\scraper.py", line 716, in
download_depop_data(userids)
File "D:\Lol\Vinted-Scraper-main\scraper.py", line 523, in download_depop_data
get_all_depop_items(data, baseurl, product_ids, args, begin, s)
File "D:\Lol\Vinted-Scraper-main\scraper.py", line 322, in get_all_depop_items
for i in data['products']:
~~~~^^^^^^^^^^^^
KeyError: 'products'

error running code

C:\Users\Admin\Downloads\python\Vinted-Scraper-2>python main.py -u 100625605
Traceback (most recent call last):
File "C:\Users\Admin\Downloads\python\Vinted-Scraper-2\main.py", line 31, in
vinted_session = v.create_session()
File "C:\Users\Admin\Downloads\python\Vinted-Scraper-2\Vinted.py", line 115, in create_session
csrfToken = req.text.split('<meta name="csrf-token" content="')[1].split('"')[0]
IndexError: list index out of range

KeyError: 'created_at'

I'm getting this error when running python3 scraper.py

Creation of the directory failed or the folder already exists 
Traceback (most recent call last):
  File "/scraper.py", line 596, in <module>
    download_vinted_data(userids, session)
  File "/scraper.py", line 162, in download_vinted_data
    created_at = data['created_at']
KeyError: 'created_at'

Could this be due to a API change?

Scraper stops due to SQlite error

I've been getting the ""r" is not defined" error as the other person who posted before did,

I've also been getting this SQlite error:

Traceback (most recent call last):
File "C:\Users\gnome739\Vinted-Scraper-main\scraper.py", line 588, in
download_depop_data(userids)
File "C:\Users\gnome739\Vinted-Scraper-main\scraper.py", line 552, in download_depop_data
c.execute(
sqlite3.OperationalError: table Depop_Data has no column named Images

I think it might be when it hits a video?

Thanks

Is there any way to save as PNG as opposed to jpeg?

Hi there, this is a great program and has worked for me every time. I'm wondering if there's a way to save all photos in lossless quality as opposed to JPG? I'm not sure if the program just downloads whatever the photo is uploaded as but I just wanted to check if this was possible. Thank you in advance

Error binding Parameter 8

I am receiving an unknown (to me) error.

runfile('D:/user/Downloads/Vinted-Scraper-main/Vinted-Scraper-main/scraper.py', wdir='D:/user/Downloads/Vinted-Scraper-main/Vinted-Scraper-main')
Creation of the directory failed or the folder already exists 
Creation of the directory failed or the folder already exists 
File already exists, skipped.
ID=46949382
Fetching page 1/2
User has more than 96 items. fetching next page....
Fetching page 2/2
Total items: 192
Creation of the directory downloads/46949382/ failed or the folder already exists 
Traceback (most recent call last):

  File "D:\user\Downloads\Vinted-Scraper-main\Vinted-Scraper-main\scraper.py", line 477, in <module>
    download_vinted_data(userids, session)

  File "D:\user\Downloads\Vinted-Scraper-main\Vinted-Scraper-main\scraper.py", line 258, in download_vinted_data
    c.execute("INSERT INTO Data(ID, User_id, Gender, Category, size, State, Brand, Colors, Price, Images, description, title, Platform)VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)", params)

InterfaceError: Error binding parameter 8 - probably unsupported type.

Management

Hello could you make a follower bot

the bot need to take a keyword or a catogory of item and start following everyone in those results
Also a option to delete X followers ( Unfollow)

Besides that there was a intersting idea to implement the scraper with Telegram so you can manage everything from messages to bids through telegram

Thanks

Download Whole Website Instead of User Specific Information

Hey!
First of all, thank you very much for providing such wonderful tool! I wanted to ask, if it would be possible to scrape not only user specific data (by providing User ID), but rather the whole website itself?
Many thanks in advance!

Vinted scraper stops early

When scraping a profile on vinted with many listings, it doesn't seem to scrape the pictures of every item.

I tried scraping a profile with 192 items listed and it only scraped 356 pictures, which is between 94-98 items I believe. I think it stopped after scraping the first page, which is 96 items, and doesn't go to the second page.

Screenshot_1

Vinted Download stops working

Hello, dont know if its only me, but the vinted Download stops working.
Got this Errors:

Traceback (most recent call last):
File "D:\Vinted-Scraper-2\scraper.py", line 613, in
download_vinted_data(userids, session)
File "D:\Vinted-Scraper-2\scraper.py", line 226, in download_vinted_data
print(f"Fetching page 1/{r.json()['pagination']['total_pages']}")
~~~~~~~~^^^^^^^^^^^^^^
KeyError: 'pagination'
Drücken Sie eine beliebige Taste . . .

or this one:

Traceback (most recent call last):
File "D:\Vinted-Scraper-2\scraper.py", line 613, in
download_vinted_data(userids, session)
File "D:\Vinted-Scraper-2\scraper.py", line 231, in download_vinted_data
get_all_items(s, USER_ID, r.json()['pagination']['total_pages'], items)
File "D:\Vinted-Scraper-2\scraper.py", line 146, in get_all_items
print(f"Fetching page {page+1}/{r['pagination']['total_pages']}")
~^^^^^^^^^^^^^^
KeyError: 'pagination'
Drücken Sie eine beliebige Taste . . .

Private Messages

Is there a possability to grab images in full res from private messages on vinted?

user profiles with api v2?

I notice that when getting user profiles you use the v1 of the api, do you know if this is possible using v2?

[Feature Request] Scrape the number of like

Hi,
I would like to order the t shirts by the number of likes.

To do that, do you think it's possible to scrape the number of like of the items in order sort them by this number after all ?

Thanks,

Vinted full size profile picture

Hello,

First of all, many thanks for this great script that works very well!
Anyway, when using it with a Vinted profile, it doesn't download the full size profile picture, but the 800px one!

For exemple, please consider this profile: https://www.vinted.fr/api/v2/users/17898589/
The full size profile picture is this one: "full_size_url":"https://images1.vinted.net/t/02_00ac4_a3xvXwC9zVxTErQQR8ci994V/1664022638.jpeg?s=ee1ec9539a7cf9c690a1d348e099e87533c76cac"

Thanks in advance if you could upgrade the script!

Greetings from France!

Vinted session argument

Hello,
I don't understand how to properly add my Vinted session after -s
With "" ou without ""?
How can I find my sessionID?
My Vinted is open on Chrome
I get "IndexError: list index out of range" line 418 & line 55

Thanks.

RSS

Hi, have you thought about creating a rss feed for vinted? I wonder if it's possible with their api. I think it would be super useful

Scraper not working since yesterday

out of function :(
Traceback (most recent call last):
File "C:\UsersX\Scraper\scraper.py", line 609, in
download_vinted_data(userids, session)
File "C:\UsersX\Scraper\scraper.py", line 161, in download_vinted_data
gender = data['gender']
KeyError: 'gender'

Crawl in search possible?

Hey there, is there any possibility to let the vinted scraper crawl a text based search? Like I search for shoes brand adidas?

Video scraping?

Hi all,

Thanks very much for the very easy to use project. I know next to nothing about coding so this is quite helpful.

My question is related to scraping videos, as there are some posts that included a video attached to the products. Is there any way to also download the videos too? Or perhaps some workaround that may work? Unless it actually has downloaded somewhere? Thank you again!

Edit: I should tack on to the end here that I am specifically hoping to use this for Depop. Thank you!

User does not exist firing erroneously

I am getting the "User does not exist" error even though that User does exist.
Scraper1
Scraper2

Attached two screenshots. As you can see, User 90683608 is shown as not existing, but does definitely exist.

Feature Request

Hello,

Would it be possible for you to add the ability to scrape depop data also? #

API Changes (not working)

line 183, in download_vinted_data
verification_phone = data['verification']['phone']['valid']
KeyError: 'phone'

I think Vinted API changed the phone sector since yesterday. Can you fix it ?

cheers

Project opportunity - New Vinted Scraping bot based on discord

Hello Gertje,
There is no issue but I wanted to contact you.
My name is Michal and with my company we'd like to build a bot based on discord that would scrap vinted.

Here's a quick description:
The goal of this project is to create a bot that can be used on Discord to help users find items they are looking for on Vinted. The bot will constantly check Vinted for new items that match the user's search criteria and send notifications to the user on Discord when new items are found.

We're looking for a freelancer that would be keen to work with us. And as you developed a similar project already, we'd be interested in working with you. :)

Can you please contact me on [email protected] if you're interested?

Many thanks !

Account managing

Hello could you make a follower bot

the bot need to take a keyword or a catogory of item and start following everyone in those results
Also a option to delete X followers ( Unfollow)

Besides that there was a intersting idea to implement the scraper with Telegram so you can manage everything from messages to bids through telegram

Thanks

Timeout Error

Hi,

I still receive a timeout error when downloading data from Depop, this happens after downloading data from about 200 items. However, I believe it is something to do with my network as I only seem to get the error on my wifi. When I use a 4g hotspot from my phone the program doesn't timeout.

However, in light of not using up all my 4G, I was wondering if you could try solve the issue? Either by being able to wait longer for a response to avoid a timeout? Or if the program does timeout, to be able to restart it where it left off? Rather than having to start the download of a store from the start.

Thank you.

Scraper not working anymore?

Hi, I don't know if I'm the only one but since a few days the Scraper doesn't work anymore (it closes immediately).

Here is what I get as an error:

Traceback (most recent call last):
File "C:\Users...\main.py", line 31, in
vinted_session = v.create_session()
File "C:\Users...\Vinted.py", line 115, in create_session
csrfToken = req.text.split('<meta name="csrf-token" content="')[1].split('"')[0]
IndexError: list index out of range

multiple user IDs at once

Hi :) is it possible to input multiple user IDs at once? And how can I get the script to run every 5 mins for example?

user does not exist

when i enter the user id the program says the user does not exist

i just puth the 8 digit number in the user text file and run te program, what is going wrong?

depop SSL: CERTIFICATE_VERIFY_FAILED

Hello !

When runing the commande for depop "python scraper.py -n" i get this error
Has anyone experienced this error?

PS C:\Users\berze\Downloads\Vinted-Scraper-main> python scraper.py -d
Creation of the directory failed or the folder already exists
Traceback (most recent call last):
  File "C:\Users\berze\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 715, in urlopen
    httplib_response = self._make_request(
                       ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\berze\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 404, in _make_request
    self._validate_conn(conn)
  File "C:\Users\berze\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 1058, in _validate_conn
    conn.connect()
  File "C:\Users\berze\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connection.py", line 419, in connect
    self.sock = ssl_wrap_socket(
                ^^^^^^^^^^^^^^^^
  File "C:\Users\berze\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\util\ssl_.py", line 449, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(
               ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\berze\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\util\ssl_.py", line 493, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\berze\AppData\Local\Programs\Python\Python311\Lib\site-packages\cloudscraper\__init__.py", line 98, in wrap_socket
    return self.ssl_context.orig_wrap_socket(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\berze\AppData\Local\Programs\Python\Python311\Lib\ssl.py", line 517, in wrap_socket
    return self.sslsocket_class._create(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\berze\AppData\Local\Programs\Python\Python311\Lib\ssl.py", line 1108, in _create
    self.do_handshake()
  File "C:\Users\berze\AppData\Local\Programs\Python\Python311\Lib\ssl.py", line 1379, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1006)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\berze\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\adapters.py", line 440, in send
    resp = conn.urlopen(
           ^^^^^^^^^^^^^
  File "C:\Users\berze\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 799, in urlopen
    retries = retries.increment(
              ^^^^^^^^^^^^^^^^^^
  File "C:\Users\berze\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\util\retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='depop.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1006)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\berze\Downloads\Vinted-Scraper-main\scraper.py", line 602, in <module>
    download_depop_data(userids)
  File "C:\Users\berze\Downloads\Vinted-Scraper-main\scraper.py", line 353, in download_depop_data
    s.get("https://depop.com")
  File "C:\Users\berze\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\sessions.py", line 542, in get
    return self.request('GET', url, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\berze\AppData\Local\Programs\Python\Python311\Lib\site-packages\cloudscraper\__init__.py", line 257, in request
    self.perform_request(method, url, *args, **kwargs)
  File "C:\Users\berze\AppData\Local\Programs\Python\Python311\Lib\site-packages\cloudscraper\__init__.py", line 190, in perform_request
    return super(CloudScraper, self).request(method, url, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\berze\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\sessions.py", line 529, in request
    resp = self.send(prep, **send_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\berze\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\sessions.py", line 645, in send
    r = adapter.send(request, **kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\berze\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\adapters.py", line 517, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='depop.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1006)')))

Connection Timeout Error - Feature Suggestion

Hi, first of all, great program! However I seems to be getting a connection timeout when pulling data from Depop

C:\Users\harve\Downloads\Vinted-Scraper-main\Vinted-Scraper-main>python scraper.py -d
Creation of the directory failed or the folder already exists
coose
https://webapi.depop.com/api/v1/shop/coose/
https://media-photos.depop.com/b0/18244865/871121032_eb54cf4473da478fab8e5572df9f1be3/U0.jpg
Creation of the directory failed or the folder already exists
Fetching all produts...
https://webapi.depop.com/api/v1/shop/18244865/products/?limit=200&offset_id=MzEzODE1NTYzfDIwMjItMTEtMTNUMDg6MzA6MjguNzgzNzE0WnwyMDA
https://webapi.depop.com/api/v1/shop/18244865/products/?limit=200&offset_id=MzEwMTAzNTQ0fDIwMjItMTEtMTNUMDg6MTg6MDcuODE2MTRafDQwMA
https://webapi.depop.com/api/v1/shop/18244865/products/?limit=200&offset_id=MzIzNzAyOTEzfDIwMjItMTEtMTJUMjI6NDY6NDkuMTcyMjY4Wnw2MDA
https://webapi.depop.com/api/v1/shop/18244865/products/?limit=200&offset_id=MzA2NDUyMTg4fDIwMjItMTEtMTJUMjI6MzI6MTEuNjUzMzYxWnw4MDA
https://webapi.depop.com/api/v1/shop/18244865/products/?limit=200&offset_id=MzE2Njc3ODU4fDIwMjItMTEtMDZUMTI6MTQ6MjYuMDE5NjE2WnwxMDAw
https://webapi.depop.com/api/v1/shop/18244865/products/?limit=200&offset_id=MzE2MjYxMDYwfDIwMjItMDktMThUMTc6NTE6MzcuMDAzMzAxWnwxMjAw
https://webapi.depop.com/api/v1/shop/18244865/products/?limit=200&offset_id=Mjg3NjQ1MzMyfDIwMjItMDctMjZUMTY6MTE6MTYuOTEyMTg4WnwxNDAw
https://webapi.depop.com/api/v1/shop/18244865/products/?limit=200&offset_id=MjkzODczNjQyfDIwMjItMDUtMDVUMDg6MzQ6MDAuNTg4NTcxWnwxNjAw
https://webapi.depop.com/api/v1/shop/18244865/products/?limit=200&offset_id=MjcxMzczMDgwfDIwMjItMDMtMDFUMjI6NTI6NTcuNzE1MzQxWnwxODAw
https://webapi.depop.com/api/v1/shop/18244865/products/?limit=200&offset_id=MjczMzA4ODc4fDIwMjEtMTItMTdUMTU6NDI6NDguMjEzNTkyWnwyMDAw
https://webapi.depop.com/api/v1/shop/18244865/products/?limit=200&offset_id=MjUwMDM2NTU2fDIwMjEtMDktMDJUMjM6MTg6MzMuNDI5MDc5WnwyMjAw
https://webapi.depop.com/api/v1/shop/18244865/products/?limit=200&offset_id=MjIwNjMxMjYxfDIwMjEtMDQtMTJUMDk6MDM6MTUuMTYxMDM4WnwyNDAw
https://webapi.depop.com/api/v1/shop/18244865/products/?limit=200&offset_id=MjA3MjA3MTI4fDIwMjAtMTItMjlUMjM6Mjk6MjkuMzY5NDkzWnwyNjAw
https://webapi.depop.com/api/v1/shop/18244865/products/?limit=200&offset_id=MTYxOTAxNzQ4fDIwMjAtMTAtMThUMjI6MzI6MDcuNTc2ODk4WnwyODAw
https://webapi.depop.com/api/v1/shop/18244865/products/?limit=200&offset_id=MTgwMTg4NDExfDIwMjAtMDktMDdUMTM6NDY6NTUuNzU0ODI0WnwzMDAw
https://webapi.depop.com/api/v1/shop/18244865/products/?limit=200&offset_id=MTU2OTIxNTQwfDIwMjAtMDYtMThUMTc6NDg6NDEuMTQ0MzQ5WnwzMjAw
Got all products. Start Downloading...
3289
Creation of the directory downloads/coose/ failed or the folder already exists
Traceback (most recent call last):
File "C:\Users\harve\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connection.py", line 174, in _new_conn
conn = connection.create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\harve\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\util\connection.py", line 95, in create_connection
raise err
File "C:\Users\harve\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\util\connection.py", line 85, in create_connection
sock.connect(sa)
TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\harve\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "C:\Users\harve\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 386, in _make_request
self._validate_conn(conn)
File "C:\Users\harve\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 1042, in _validate_conn
conn.connect()
File "C:\Users\harve\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connection.py", line 358, in connect
self.sock = conn = self._new_conn()
^^^^^^^^^^^^^^^^
File "C:\Users\harve\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connection.py", line 179, in _new_conn
raise ConnectTimeoutError(
urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.HTTPSConnection object at 0x0000024C99675950>, 'Connection to webapi.depop.com timed out. (connect timeout=None)')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\harve\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\adapters.py", line 489, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "C:\Users\harve\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\connectionpool.py", line 787, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "C:\Users\harve\AppData\Local\Programs\Python\Python311\Lib\site-packages\urllib3\util\retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='webapi.depop.com', port=443): Max retries exceeded with url: /api/v2/product/coose_g-black-vintage-adidas-joggers-black (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x0000024C99675950>, 'Connection to webapi.depop.com timed out. (connect timeout=None)'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\harve\Downloads\Vinted-Scraper-main\Vinted-Scraper-main\scraper.py", line 422, in
download_depop_data(userids)
File "C:\Users\harve\Downloads\Vinted-Scraper-main\Vinted-Scraper-main\scraper.py", line 371, in download_depop_data
product_data = requests.get(url).json()
^^^^^^^^^^^^^^^^^
File "C:\Users\harve\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\api.py", line 73, in get
return request("get", url, params=params, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\harve\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\harve\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\harve\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\harve\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\adapters.py", line 553, in send
raise ConnectTimeout(e, request=request)
requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='webapi.depop.com', port=443): Max retries exceeded with url: /api/v2/product/coose_g-black-vintage-adidas-joggers-black (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x0000024C99675950>, 'Connection to webapi.depop.com timed out. (connect timeout=None)'))

If you could help with this issue that would be great! It seems to be okay when pulling information from smaller stores but not so much with larger ones.

Also, would it be possible to only pull the item data and not the images, hopefully speeding up the download? And potentially being able to pull upload/sold dates?

I have limited experience with python so any help would be much appreciated. Thank you!

Stops early

Doesn't seem to do the entire profile. Stops after a while before entire profile is finished (after 476 images).

Maximum amount of retries reached

Hi, thanks for your script! Unfortunately it doesn't work for me.
When I launch the script with Python Launcher, the terminal error is:
`During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/e/Downloads/Vinted-Scraper-main/scraper.py", line 342, in
session, params = vinted_session()
File "/Users/e/Downloads/Vinted-Scraper-main/scraper.py", line 42, in vinted_session
ua = UserAgent()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/fake_useragent/fake.py", line 69, in init
self.load()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/fake_useragent/fake.py", line 75, in load
self.data = load_cached(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/fake_useragent/utils.py", line 250, in load_cached
update(path, use_cache_server=use_cache_server, verify_ssl=verify_ssl)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/fake_useragent/utils.py", line 245, in update
write(path, load(use_cache_server=use_cache_server, verify_ssl=verify_ssl))
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/fake_useragent/utils.py", line 187, in load
ret = json.loads(get(
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/fake_useragent/utils.py", line 84, in get
raise FakeUserAgentError('Maximum amount of retries reached')
fake_useragent.errors.FakeUserAgentError: Maximum amount of retries reached`

Can you help out? :)

Vinted sold items

Hi,

I don't remember if this question has already been asked.
Do you think it's possible to download the sold items of a Vinted profile?

The sold items still appear online but they obviously are removed from the URL "https://www.vinted.nl/api/v2/users/{USER_ID}/items?page={page}&per_page=200000". The code can't download them.

I guess these items are stored in another URL when they are sold until they are deleted by the user or by Vinted.

Greetings. EMG.

Scraper fails with error at line 70

Hello,

Unable to use this to scrape depop profiles

C:\Downloads\depop>python scraper.py
File "C:\Downloads\depop\scraper.py", line 70
<title>Vinted-Scraper/scraper.py at main · Gertje823/Vinted-Scraper · GitHub</title>
^
SyntaxError: invalid character '·' (U+00B7)

I have this script in a folder with another download folder within that. users.txt is populated with a single account id.

Any help?

purchases scrapper

Hello, I would like to know if it is possible to extract purchases and sales from the account using the sessionID. (information is available in “my sales and purchases” of the vinted application)

not clear how to use

Can you expand on the user manual a bit? What do you need to do to download your favorites for example?
I've set the user txt. Then I open command prompt and type
python scraper.py -u myUserID -f -s mySessionID

The result is 'no module named cloudscraper'.

Depop 403

When running the script for Depop users, the request to the Depop api results in an authorization error (403 forbidden). I’ve tried different headers, vpns, and cloudscraper with no luck. Vinted still works without issue. Any advice would be appreciated. Thanks!

Depop 'products' issue

Traceback (most recent call last):
File "D:\Lol\Vinted-Scraper-main\scraper.py", line 709, in
download_depop_data(userids)
File "D:\Lol\Vinted-Scraper-main\scraper.py", line 517, in download_depop_data
get_all_depop_items(data, baseurl, product_ids, args, begin, s)
File "D:\Lol\Vinted-Scraper-main\scraper.py", line 318, in get_all_depop_items
for i in data['products']:
~~~~^^^^^^^^^^^^
KeyError: 'products'

Item Category Label Needed

Hello and thank you, really nice tool!

I have 3 proposals:

  • there's a way to translate a int Category on Data table into clear text label (like 'boots')?
  • there's a way to scrap the reviews as raw texts and store into the DB?
  • there's a way to scrap a user's followers and followings? (Have a few ideas relating to this)

All the extra collected raw texts descriptions and labels than you can get are matter of interests (maybe in a future adding tables + columns to the DB?

Im working on similar proyects, and recently discover Object Relational Mapping (SQLAlchemy). Very usefull for all the data collection works, and chatGPT can make you the Models definition (trust me). Also implementing SOLID (separating the tasks in files and classes), would be perfect to let other people developing along with you in this repo (like me), otherwise even the code it's clean, it's harder to read.

Thanks :)

Large Vinted profiles not downloaded in their entirety

Hello,

I noticed that for some large Vinted profiles (more than 100 articles for exemple), the script doesn't download the photos in their entirety.

Indeed, in that case the script needs to go on page 2, page 3, etc... of the JSON code and not only on page 1.

For exemple:
https://www.vinted.fr/member/13204749-maylis3110
https://www.vinted.fr/api/v2/users/13204749/items?page=1&per_page=200000
https://www.vinted.fr/api/v2/users/13204749/items?page=2&per_page=200000

At the bottom of each page can be found information about the pagination:
"pagination":{"current_page":1,"total_pages":2,"total_entries":176,"per_page":96,"time":1665930854},"code":0}
"pagination":{"current_page":2,"total_pages":2,"total_entries":176,"per_page":96,"time":1665931444},"code":0}

Thanks in advance if you could upgrade the script!

Greetings from France!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.