Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crawl in search possible? #25

Open
kioz89 opened this issue Dec 15, 2022 · 2 comments
Open

Crawl in search possible? #25

kioz89 opened this issue Dec 15, 2022 · 2 comments
Assignees

Comments

@kioz89
Copy link

kioz89 commented Dec 15, 2022

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

@Gertje823 Gertje823 self-assigned this Dec 15, 2022
Gertje823 added a commit that referenced this issue Dec 15, 2022
[Vinted] Added support for scraping by search tag.(#25)
** This feature is limited **
Search does not provide much product info.
@Gertje823
Copy link
Owner

The results of the search api does not contain much product info. Also the number of items are limited.

Nevertheless I added the option to scrape data by tags.
You can download it here.

Put your tags in the tags.txt file en run the script like python scraper.py -t
It creates a folder for each tag to download the images in.

Could you let me know if it works for you, so I can merge it into the main branche?

@kioz89
Copy link
Author

kioz89 commented Dec 16, 2022

It works fine for me. I modified the code a little bit, because i always want to seperate the files in different folders with the username and the ID in it.
Unfortunatley it works for the the user id but not the username for example:
Item 01 02_00b5c_T46twEuUR2dBpW6ybdQEtXx342058931
{Title} 02_00b5c_T46twEuUR2dBpW6ybdQEtXx3 {User_id} <- works

code looks like (works)
filepath = 'downloads/' + tag.lower() + '/' + re.sub(r'[*?!"-//\n\|]', ' ', title) + img_name + str(User_id) + '.jpeg'

but when i change the code to: (does not work)
filepath = 'downloads/' + tag.lower() + '/' + re.sub(r'[*?!"-//\n\|]', ' ', title) + img_name + str(User_id) + str(Username) + '.jpeg'

it did not work cause i guess it's not implemented. I changed the listings within the tags section
ID = product['id'] User_id = product['user']['id'] # Description is not available in search description = '' # Gender is not available in search Gender = ''

                to

username = product['Username'] User_id = product['user']['id'] # Description is not available in search description = '' # Gender is not available in search Gender = ''

                Maybe it's somehow possible to change the code in a way so i can call the username whereever i want within the vinted script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants