Skip to main content

Pinterest Scraper

A powerful Python tool to scrape and download images from Pinterest using Playwright. This tool extracts image URLs from any Pinterest board and downloads them concurrently with multi-threading, offering both headless and standard browser modes.

Features

  • Image Scraping: Extract image URLs from any Pinterest board.
  • Concurrent Downloads: Download images efficiently using multi-threading.
  • Command-Line Interface (CLI): Simple and user-friendly CLI for quick operations.
  • Headless Mode: Option to run in headless mode for faster, resource-efficient scraping.
  • Modular Design: Well-organized code structure for easy customization and extension.

Installation

Prerequisites

  • Python 3.6+
  • Google Chrome or Chromium installed
  • Playwright dependencies installed

Steps

  1. Clone the repository:

    git clone https://github.com/Jarvis-Mi/-Pinterest-Image-Scraper.git
    cd pinterest_scraper
    
  2. Install dependencies:

       pip install -e .
       playwright install
    

Usage

Run the scraper using:

Run the scraper using:

pinterest-scraper <username> <tag> <num_images> [--headless]

Arguments:

  1. : Pinterest username or profile name.
  2. : Tag or board name.
  3. <num_images>: Number of images to download.
  4. [--headless]: (Optional) Run the browser in headless mode.

Example:

pinterest-scraper exampleuser travel 20 --headless

This command scrapes and downloads 20 images from the "travel" board of user "exampleuser" in headless mode.

Now that your package has been successfully installed, you can test it by installing it using pip and running a simple script to verify that it works.

Usage

Install the package:

pip install auto-pi-download

Test the package:

Once installed, you can test the package by writing a simple script. The package includes a module to download Pinterest images (based on the package name), you can use the following sample code to test it:

from pinterest_scraper import get_image_urls, download_images

# Example usage
pinterest_url = "https://www.pinterest.com/exampleuser/board/"  
num_images = 10  

img_urls = get_image_urls(pinterest_url, num_images=num_images)

if not img_urls:
    print("No images found.")
else:
    print(f"Found {len(img_urls)} images.")
    download_images(img_urls, "exampleuser")  
    print("Download completed.")

Metadata

Release files for auto-pi-download 0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for auto-pi-download 0.5
File Size Uploaded Provenance Actions
auto_pi_download-0.5.tar.gz 4.6 kB Without provenance Details for auto_pi_download-0.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for auto-pi-download 0.5
File Interpreter ABI Platform Actions
auto_pi_download-0.5-py3-none-any.whl Python 3 none any Details for auto_pi_download-0.5-py3-none-any.whl

Total release size: 10.4 kB

Release files / auto_pi_download-0.5.tar.gz

Download URL auto_pi_download-0.5.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
8d2896a7dff0a5a9fea7cf4b5378012a7ae74287275015eaa5a4e241af0098ad
BLAKE2b-256 checksum
How to use checksums
fe6ed9bf5cf08c2f3c6a5da4ce82243a0fd50896e0a9dbea696c6ec9096fd2e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.0

Release files / auto_pi_download-0.5-py3-none-any.whl

Download URL auto_pi_download-0.5-py3-none-any.whl
Size 5.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9a1e47cf77fce681bc233710f7de7716310a6e6963ac0d50616fb1fd4b7fc555
BLAKE2b-256 checksum
How to use checksums
22d1d7a4c14fdfe983b294668d3e938e48ad56f35c92ceb4e7e9cb1e54d1a41f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.0

Security for auto-pi-download 0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.5 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page