"Scraping Visually Similar Images from Pinterest"
Clone the base repository onto your desktop with git
as follows:
$ git clone https://github.com/SwatiModi/pinterest-web-scraper
$ pip install -r requirements.txt
$ wget https://chromedriver.storage.googleapis.com/2.41/chromedriver_linux64.zip
$ unzip chromedriver_linux64.zip
$ sudo mv chromedriver /usr/bin/chromedriver
$ sudo chown root:root /usr/bin/chromedriver
$ sudo chmod +x /usr/bin/chromedriver
I have tried a example on query "mens checked shirt" and pushed the resultant csv and folder here in the repo.
$ python pinterest.py
or pass the search query category as a argument
$ python pinterest.py --category <search query>
This will create a CSV of URLs to pins for the given search query
$ python dowload_similar_images.py
This script reads all the URLs from the CSV created by previous script. For each pin URL, it downloads the visually similar images and saved in respective folders pin-wise.
This will create a hierarchy of folders and images as follows:
Web Scraping from many websites is Illegal.
This project is just for Learning and Fun.