Skip to content

Takes the URL to a Pinterest board and returns a List of all of the image URLs on that board.

Notifications You must be signed in to change notification settings

ankitshekhawat/pinterest-scraper

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Pinterest Image Scraper

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.

Requirements:

  • 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
  • A Pinterest Account

How to Run:

  • 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

Use in a script

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/")

Changes

  • 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]>

About

Takes the URL to a Pinterest board and returns a List of all of the image URLs on that board.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%