pinterest-dl


Namepinterest-dl JSON
Version 0.0.26 PyPI version JSON
download
home_pageNone
SummaryAn unofficial Pinterest image downloader
upload_time2024-11-04 12:27:12
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseApache-2.0
keywords pinterest image downloader selenium web scraping
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
- 🔲 Limited functionality with Pinterest URLs requiring login.
- 🔲 Incompatibility with Pinterest URLs that include search queries.
- 🔲 Not sorely tested on Linux and Mac. Please create an [Issue](https://github.com/sean1832/pinterest-dl/issues) to report any bugs.

## 📋 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": null,
    "name": "pinterest-dl",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "pinterest, image downloader, selenium, web scraping",
    "author": null,
    "author_email": "sean1832 <dev@zekezhang.com>",
    "download_url": "https://files.pythonhosted.org/packages/57/0a/e23e901d5bde13bcdead2011e14513e5fb494065b712d2036060d7cb1515/pinterest_dl-0.0.26.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 Limited functionality with Pinterest URLs requiring login.\r\n- \ud83d\udd32 Incompatibility with Pinterest URLs that include search queries.\r\n- \ud83d\udd32 Not sorely tested on Linux and Mac. Please create an [Issue](https://github.com/sean1832/pinterest-dl/issues) to report any bugs.\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.26",
    "project_urls": {
        "Homepage": "https://github.com/sean1832/pinterest-dl",
        "Issues": "https://github.com/sean1832/pinterest-dl/issues"
    },
    "split_keywords": [
        "pinterest",
        " image downloader",
        " selenium",
        " web scraping"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "654bf724775a6f86d621db05b16dfb3243979501fb97a35c71875b8651c7aa99",
                "md5": "db5f3fc2966371fd454e8d6da2a2fd29",
                "sha256": "37a4468b3ed76934f91d8b92daf2739dfbbb8a7f7d2685ee343a6e7850d73c18"
            },
            "downloads": -1,
            "filename": "pinterest_dl-0.0.26-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "db5f3fc2966371fd454e8d6da2a2fd29",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 18009,
            "upload_time": "2024-11-04T12:27:10",
            "upload_time_iso_8601": "2024-11-04T12:27:10.719629Z",
            "url": "https://files.pythonhosted.org/packages/65/4b/f724775a6f86d621db05b16dfb3243979501fb97a35c71875b8651c7aa99/pinterest_dl-0.0.26-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "570ae23e901d5bde13bcdead2011e14513e5fb494065b712d2036060d7cb1515",
                "md5": "db2dc7053855172b4d7c9db57f3f714e",
                "sha256": "407bc3ff323edcac75d3491b04cb9036d40ebfb5ad8497f961f73e82f9024f49"
            },
            "downloads": -1,
            "filename": "pinterest_dl-0.0.26.tar.gz",
            "has_sig": false,
            "md5_digest": "db2dc7053855172b4d7c9db57f3f714e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 17259,
            "upload_time": "2024-11-04T12:27:12",
            "upload_time_iso_8601": "2024-11-04T12:27:12.996165Z",
            "url": "https://files.pythonhosted.org/packages/57/0a/e23e901d5bde13bcdead2011e14513e5fb494065b712d2036060d7cb1515/pinterest_dl-0.0.26.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-04 12:27:12",
    "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.52523s