An unofficial Pinterest image downloader
Project description
Pinterest Image Downloader CLI (pinterest-dl)
This CLI (Command Line Interface) tool facilitates the scraping and downloading of images from Pinterest. Using Selenium for automation, it enables users to extract images from a specified Pinterest URL and save them to a chosen directory.
⚠️ Disclaimer:
This project is independent and not affiliated with Pinterest. It's designed solely for educational purposes. Please be aware that automating the scraping of websites might conflict with their Terms of Service. The repository owner disclaims any liability for misuse of this tool. Use it responsibly and at your own legal risk.
🗒️ Note:
This project draws inspiration from pinterest-image-scraper.
🌟 Features
- ✅ Scrape images directly from a Pinterest URL.
- ✅ Asynchronously download images from a list of URLs. (see pull request)
- ✅ Configure the output directory to your liking.
- ✅ Save scraped URLs to a JSON file for easy access.
- ✅ Utilize incognito mode to keep your scraping discreet.
- ✅ Access detailed output for effective debugging.
- ✅ Perform dry-runs to receive URLs without downloading the images.
- ✅ Full support for the Firefox browser.
- ✅ Customize scroll threshold and page persistence for tailored scraping.
🚩 Known Issues
- 🔲 Experimental Firefox browser support might not perform as expected.
- 🔲 Limited functionality with Pinterest URLs requiring login.
- 🔲 Incompatibility with Pinterest URLs that include search queries.
- 🔲 Currently does not support MacOS and Linux platforms.
📋 Requirements
- Python 3.10 or newer
- Chrome or Firefox browser
📥 Installation
Using pip (Recommended)
pip install pinterest-dl
Cloning from GitHub
git clone https://github.com/sean1832/pinterest-dl.git
cd pinterest-dl
pip install .
🛠 Usage
General Command Structure
pinterest-dl [command] [options]
Commands
1. Scrape
Extract images from a specified Pinterest URL.
Syntax:
pinterest-dl scrape [url] [options]
Options:
-o
,--output [directory]
: Set the directory to save images (default:imgs
).-w
,--write [file]
: Save scraped URLs to a JSON file.-t
,--threshold [number]
: Set the number of page scrolls (default: 20).-p
,--persistence [seconds]
: Wait time for page loading (default: 120 seconds).-r
,--resolution [width]x[height]
: Minimum image resolution for download (e.g., 512x512).--incognito
: Activate incognito mode for scraping.--dry-run
: Execute scrape without downloading images.--firefox
: Opt for Firefox as the scraping browser.--verbose
: Enable detailed output for debugging.--headless
: Run the browser in headless mode. (no scraping progress output in headless mode)
2. Download
Download images from a list of URLs provided in a file.
Syntax:
pinterest-dl download [url_list] [options]
Options:
-o
,--output [directory]
: Specify the output directory for the images (default:imgs
).-r
,--resolution [width]x[height]
: minimum resolution to download (e.g. 512x512).--verbose
: Enable verbose output.
Examples
Scraping Images:
pinterest-dl scrape "https://www.pinterest.com/exampleBoard" -o myimages -t 30 --verbose
Downloading Images:
pinterest-dl download urls.json -o downloaded_imgs --verbose
📜 License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pinterest_dl-0.0.16-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2d1b1b623726eef2b03cd1189d9ddda6818c5848493359de3629493830ca34f |
|
MD5 | bb45e101ef914508a590e34b80ccbbee |
|
BLAKE2b-256 | 1a76600193e5fe24343e6ea712da0ee8b0b17953296d1bb79f26bc586438cdaa |