Now you can take the URL to any Pinterest board (or a CSV of a bunch of boards) and return a Python list of the URLs to the hi-rez versions of all of the images on the board.
-
Python 3
-
Selenium (pip install selenium)
-
Chrome driver ( Download and place in the directory) or Firefox:
brew install chromedriver
-
aria2c (a command line download utility)
- Mac:
brew install aria2
- Ubuntu:
sudo apt-get install aria2
- Centos/Fedora:
sudo yum install aria2
- Mac:
-
A Pinterest Account
-
mv ./config_sample.py ./config.py
-
Add your username / password to config.py
-
Then use:
./scraper.py <search term | board url> <destination folder[optional]>
-
For example:
./scraper.py "Persian cats" ./persian_cats
./scraper.py https://pinterest.com/kuxbini/cute-pets/ ./persian_cats
import scraper as s
ph = s.PinterestHelper(PINTEREST_USERNAME, PINTEREST_PASSWORD)
# Returns an array of image urls
images = ph.runme("Persian Cats")
# Use a image board url instead
images = ph.runme("https://pinterest.com/kuxbini/cute-pets/")
- Pinterest now uses /474x/ files instead of /236x/ . So changed it to 474x in the url search
- Changed to Chrome driver
- Moved to python 3
- removed dependency on pandas, pickle
- runs as a script with syntax ./scraper.py <search term | board url> <destination folder[optional]>