pinterest-dl


Namepinterest-dl JSON
Version 0.0.21 PyPI version JSON
download
home_pagehttps://github.com/sean1832/pinterest-dl
SummaryAn unofficial Pinterest image downloader
upload_time2024-04-05 10:47:45
maintainerNone
docs_urlNone
authorZeke Zhang
requires_pythonNone
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Pinterest Image Downloader CLI (pinterest-dl)
[![PyPI - Version](https://img.shields.io/pypi/v/pinterest-dl)](https://pypi.org/project/pinterest-dl/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pinterest-dl)](https://pypi.org/project/pinterest-dl/)
[![PyPI - License](https://img.shields.io/pypi/l/pinterest-dl)](https://github.com/sean1832/pinterest-dl/blob/main/LICENSE)
[![Downloads](https://static.pepy.tech/badge/pinterest-dl)](https://pepy.tech/project/pinterest-dl)


This CLI (Command Line Interface) tool facilitates the scraping and downloading of images from [Pinterest](https://pinterest.com). Using [Selenium](https://selenium.dev) 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](https://developers.pinterest.com/terms/). 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](https://github.com/xjdeng/pinterest-image-scraper).

## 🌟 Features
- ✅ Scrape images directly from a Pinterest URL.
- ✅ Asynchronously download images from a list of URLs. ([see pull request](https://github.com/sean1832/pinterest-dl/pull/1))
- ✅ Save scraped URLs to a JSON file for future access.
- ✅ Incognito mode to keep your scraping discreet.
- ✅ Access detailed output for effective debugging.
- ✅ Support for the Firefox browser.
- ✅ Insert `alt` text for images as metadata `comment` in the downloaded image for searchability.

## 🚩 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)
```bash
pip install pinterest-dl
```

### Cloning from GitHub
```bash
git clone https://github.com/sean1832/pinterest-dl.git
cd pinterest-dl
pip install .
```

## 🛠 Usage

### General Command Structure
```bash
pinterest-dl [command] [options]
```

---
### Examples

**Scraping Images:**

Scrape images to the `./images/art` directory from the Pinterest URL `https://www.pinterest.com/pin/1234567` with a limit of `30` images and a minimum resolution of `512x512`. Save scraped URLs to a `JSON` file.
```bash
pinterest-dl scrape "https://www.pinterest.com/pin/1234567" "images/art" -l 30 -r 512x512 --json
```

**Downloading Images:**

Download images from the `art.json` file to the `./downloaded_imgs` directory with a minimum resolution of `1024x1024`.
```bash
pinterest-dl download art.json -o downloaded_imgs -r 1024x1024
```
---
### Commands

#### 1. Scrape
Extract images from a specified Pinterest URL.

**Syntax:**
```bash
pinterest-dl scrape [url] [output_dir] [options]
```

**Options:**
- `-l`, `--limit [number]`: Max number of image to download (default: 100).
- `-r`, `--resolution [width]x[height]`: Minimum image resolution for download (e.g., 512x512).
- `--timeout [second]`: Timeout in seconds for requests (default: 3).
- `--incognito`: Activate incognito mode for scraping.
- `--json`: Save scraped URLs to a JSON file.
- `--dry-run`: Execute scrape without downloading images.
- `--firefox`: Opt for Firefox as the scraping browser.
- `--headful`: Run in headful mode with browser window.
- `--verbose`: Enable detailed output for debugging.

#### 2. Download
Download images from a list of URLs provided in a file.

**Syntax:**
```bash
pinterest-dl download [url_list] [options]
```

**Options:**
- `-o`, `--output [directory]`: Output directory (default: ./<json_filename>).
- `-r`, `--resolution [width]x[height]`: minimum resolution to download (e.g. 512x512).
- `--verbose`: Enable verbose output.



## 📜 License
[Apache License 2.0](LICENSE)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/sean1832/pinterest-dl",
    "name": "pinterest-dl",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "Zeke Zhang",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/44/3d/962ca81987b49b114eec7402052bd953bec4ec4029dd4eee6824a8612ab2/pinterest-dl-0.0.21.tar.gz",
    "platform": null,
    "description": "# Pinterest Image Downloader CLI (pinterest-dl)\r\n[![PyPI - Version](https://img.shields.io/pypi/v/pinterest-dl)](https://pypi.org/project/pinterest-dl/)\r\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pinterest-dl)](https://pypi.org/project/pinterest-dl/)\r\n[![PyPI - License](https://img.shields.io/pypi/l/pinterest-dl)](https://github.com/sean1832/pinterest-dl/blob/main/LICENSE)\r\n[![Downloads](https://static.pepy.tech/badge/pinterest-dl)](https://pepy.tech/project/pinterest-dl)\r\n\r\n\r\nThis CLI (Command Line Interface) tool facilitates the scraping and downloading of images from [Pinterest](https://pinterest.com). Using [Selenium](https://selenium.dev) for automation, it enables users to extract images from a specified Pinterest URL and save them to a chosen directory.\r\n\r\n> **\u26a0\ufe0f Disclaimer:**  \r\n> 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](https://developers.pinterest.com/terms/). The repository owner disclaims any liability for misuse of this tool. Use it responsibly and at your own legal risk.\r\n\r\n> **\ud83d\uddd2\ufe0f Note:**  \r\n> This project draws inspiration from [pinterest-image-scraper](https://github.com/xjdeng/pinterest-image-scraper).\r\n\r\n## \ud83c\udf1f Features\r\n- \u2705 Scrape images directly from a Pinterest URL.\r\n- \u2705 Asynchronously download images from a list of URLs. ([see pull request](https://github.com/sean1832/pinterest-dl/pull/1))\r\n- \u2705 Save scraped URLs to a JSON file for future access.\r\n- \u2705 Incognito mode to keep your scraping discreet.\r\n- \u2705 Access detailed output for effective debugging.\r\n- \u2705 Support for the Firefox browser.\r\n- \u2705 Insert `alt` text for images as metadata `comment` in the downloaded image for searchability.\r\n\r\n## \ud83d\udea9 Known Issues\r\n- \ud83d\udd32 Experimental Firefox browser support might not perform as expected.\r\n- \ud83d\udd32 Limited functionality with Pinterest URLs requiring login.\r\n- \ud83d\udd32 Incompatibility with Pinterest URLs that include search queries.\r\n- \ud83d\udd32 Currently does not support MacOS and Linux platforms.\r\n\r\n## \ud83d\udccb Requirements\r\n- Python 3.10 or newer\r\n- Chrome or Firefox browser\r\n\r\n## \ud83d\udce5 Installation\r\n\r\n### Using pip (Recommended)\r\n```bash\r\npip install pinterest-dl\r\n```\r\n\r\n### Cloning from GitHub\r\n```bash\r\ngit clone https://github.com/sean1832/pinterest-dl.git\r\ncd pinterest-dl\r\npip install .\r\n```\r\n\r\n## \ud83d\udee0 Usage\r\n\r\n### General Command Structure\r\n```bash\r\npinterest-dl [command] [options]\r\n```\r\n\r\n---\r\n### Examples\r\n\r\n**Scraping Images:**\r\n\r\nScrape images to the `./images/art` directory from the Pinterest URL `https://www.pinterest.com/pin/1234567` with a limit of `30` images and a minimum resolution of `512x512`. Save scraped URLs to a `JSON` file.\r\n```bash\r\npinterest-dl scrape \"https://www.pinterest.com/pin/1234567\" \"images/art\" -l 30 -r 512x512 --json\r\n```\r\n\r\n**Downloading Images:**\r\n\r\nDownload images from the `art.json` file to the `./downloaded_imgs` directory with a minimum resolution of `1024x1024`.\r\n```bash\r\npinterest-dl download art.json -o downloaded_imgs -r 1024x1024\r\n```\r\n---\r\n### Commands\r\n\r\n#### 1. Scrape\r\nExtract images from a specified Pinterest URL.\r\n\r\n**Syntax:**\r\n```bash\r\npinterest-dl scrape [url] [output_dir] [options]\r\n```\r\n\r\n**Options:**\r\n- `-l`, `--limit [number]`: Max number of image to download (default: 100).\r\n- `-r`, `--resolution [width]x[height]`: Minimum image resolution for download (e.g., 512x512).\r\n- `--timeout [second]`: Timeout in seconds for requests (default: 3).\r\n- `--incognito`: Activate incognito mode for scraping.\r\n- `--json`: Save scraped URLs to a JSON file.\r\n- `--dry-run`: Execute scrape without downloading images.\r\n- `--firefox`: Opt for Firefox as the scraping browser.\r\n- `--headful`: Run in headful mode with browser window.\r\n- `--verbose`: Enable detailed output for debugging.\r\n\r\n#### 2. Download\r\nDownload images from a list of URLs provided in a file.\r\n\r\n**Syntax:**\r\n```bash\r\npinterest-dl download [url_list] [options]\r\n```\r\n\r\n**Options:**\r\n- `-o`, `--output [directory]`: Output directory (default: ./<json_filename>).\r\n- `-r`, `--resolution [width]x[height]`: minimum resolution to download (e.g. 512x512).\r\n- `--verbose`: Enable verbose output.\r\n\r\n\r\n\r\n## \ud83d\udcdc License\r\n[Apache License 2.0](LICENSE)\r\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "An unofficial Pinterest image downloader",
    "version": "0.0.21",
    "project_urls": {
        "Homepage": "https://github.com/sean1832/pinterest-dl"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1f22fb4e885404fa75e8ca5880fdb6e54a56676415e197a84f7d2d794eecccac",
                "md5": "9f9f97b6a06d78d862ca06afcffb4288",
                "sha256": "0af71e876ee2a693e502815707cb063405702ac0f67a06b2f4f7eba027436595"
            },
            "downloads": -1,
            "filename": "pinterest_dl-0.0.21-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9f9f97b6a06d78d862ca06afcffb4288",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 16773,
            "upload_time": "2024-04-05T10:47:43",
            "upload_time_iso_8601": "2024-04-05T10:47:43.541298Z",
            "url": "https://files.pythonhosted.org/packages/1f/22/fb4e885404fa75e8ca5880fdb6e54a56676415e197a84f7d2d794eecccac/pinterest_dl-0.0.21-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "443d962ca81987b49b114eec7402052bd953bec4ec4029dd4eee6824a8612ab2",
                "md5": "39ada4aac1b82424b4bd5255d19abb15",
                "sha256": "74efa7ea53c5b46c33442a0ed6dcde66ef176de3c61a25e23ac33e182ec72cc2"
            },
            "downloads": -1,
            "filename": "pinterest-dl-0.0.21.tar.gz",
            "has_sig": false,
            "md5_digest": "39ada4aac1b82424b4bd5255d19abb15",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 15995,
            "upload_time": "2024-04-05T10:47:45",
            "upload_time_iso_8601": "2024-04-05T10:47:45.329732Z",
            "url": "https://files.pythonhosted.org/packages/44/3d/962ca81987b49b114eec7402052bd953bec4ec4029dd4eee6824a8612ab2/pinterest-dl-0.0.21.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-05 10:47:45",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sean1832",
    "github_project": "pinterest-dl",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pinterest-dl"
}
        
Elapsed time: 0.21054s