Skip to main content

A Pinterest media downloader

Project description

Pinterest Downloader

A Python library for downloading media (images and videos) from Pinterest.

Installation

You can install the package using pip:

pip3 install pinterest-downloader --upgrade

Usage

from pinterest_downloader import download_pinterest_media

# Download a Pinterest image or video
url = "https://pin.it/abcdefg"  # Replace with your Pinterest pin URL
result = download_pinterest_media(url, output_dir="downloads")
print(result)  # Prints a dictionary containing information about the download (success/failure, filename, etc.)

# Get the direct URL of the media
url_result = download_pinterest_media(url, return_url=True)
print(url_result)  # Prints the direct URL of the media file

# Specify filename (optional)
result = download_pinterest_media(url, output_dir="downloads", filename="my_pinterest_image")


#Handle Errors
try:
    result = download_pinterest_media(url, output_dir="downloads")
    print(result)
except Exception as e:
    print(f"An error occurred: {e}")

download_pinterest_media(url, output_dir="downloads", return_url=False)

  • url (str): The URL of the Pinterest pin. Required.
  • output_dir (str, optional): The directory to save the downloaded media. Defaults to "downloads".
  • return_url (bool, optional): If True, returns the direct URL of the media instead of downloading it. Defaults to False.

Features

  • Downloads images and videos from Pinterest URLs.
  • Provides direct links to media files.
  • Option to get the direct URL instead of downloading.
  • Handles potential errors during download and provides informative messages.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pinterest_downloader-1.0.0.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pinterest_downloader-1.0.0-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file pinterest_downloader-1.0.0.tar.gz.

File metadata

  • Download URL: pinterest_downloader-1.0.0.tar.gz
  • Upload date:
  • Size: 2.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for pinterest_downloader-1.0.0.tar.gz
Algorithm Hash digest
SHA256 186f9f11e6e1ef31edebe23ff2c6e9449dd741fa97562977b94036559f2977c5
MD5 13c5100afbbe8b873cef95761bf76a02
BLAKE2b-256 95dd00a2a5bb934a048f3c510f49d7680220c3389a9ba111d6bfa62228a37792

See more details on using hashes here.

File details

Details for the file pinterest_downloader-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pinterest_downloader-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bddcbe6789c578d4edbeef90096d2ed9cfca22a83bc35fb64c59fc3cff473b87
MD5 1c6754ff1a987a546183f1faf1491c11
BLAKE2b-256 49787cc694c01c4ec85a26c77cc585cf22f0b291bd7145b798fa4d0083eccf81

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page