Code Monkey home page Code Monkey logo

pinterest-image-scraper's Introduction

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.5+ (Anaconda recommended)
  • Pandas (pip install pandas or conda install pandas)
  • Firefox + Gecko driver (Firefox can be omitted if you know what you're doing and have another browser set up to be used via Selenium)
  • Selenium (pip install selenium or conda install -c conda-forge selenium, then see these instructions for installing the Gecko driver if not installing it from Conda)
  • Alternatively, install the Gecko driver using conda: conda install -c conda-forge geckodriver
  • If you want to use Chrome or PhantomJS, install their respective selenium drivers: conda install python-chromedriver-binary phantomjs
  • A Pinterest Account

How to Run:

git clone https://github.com/xjdeng/pinterest-image-scraper.git
cd pinterest-image-scraper
pip install -U .
cd ..
python
from pinterest_scraper import scraper as s
ph = s.Pinterest_Helper(<Pinterst login> , <Pinterest password>)
images = ph.runme("http://URL-to-image-board")

Or if you have a CSV file with a URL to a different image board on every line:

images = ph.getURLs(imageboards.csv)

Now if you want to download these images:

s.download(images, "/path/to/your/destination/dir")

or to download to your current directory:

s.download(images)

Note: you no longer need Firefox. If you'd like to use a different browser (i.e. Chrome or PhantomJS), you'll need to initialize it through selenium, then pass it through the Pinterest_Helper object. For example, using Chrome:

from selenium import webdriver
chrome = webdriver.Chrome()
ph = s.Pinterest_Helper(<Pinterst login> , <Pinterest password>, chrome)

pinterest-image-scraper's People

Contributors

xjdeng avatar

Watchers

 avatar

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.