← 返回
内容创作 中文

Pinterest Scraper

Scrapes Pinterest boards, profiles, or search results with infinite scroll, image quality options, deduplication, resume support, and Telegram album sending.
抓取 Pinterest 画板、个人主页或搜索结果,支持无限滚动、图片质量选项、去重、断点续传以及 Telegram 相册发送。
kexu9
内容创作 clawhub v1.1.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 952
下载
💾 31
安装
1
版本
#latest

概述

Pinterest Scraper

Full-featured Pinterest image scraper with automatic scrolling and multiple output options.

When This Skill Activates

This skill triggers when user wants to download images from Pinterest.

Reasoning Framework

StepActionWhy
-------------------
1EXTRACTParse Pinterest URL to determine board/user/search
2LAUNCHStart Playwright browser with stealth options
3SCROLLIncrementally load images (Pinterest uses infinite scroll)
4COLLECTExtract image URLs with quality selection
5DEDUPHash-based duplicate detection
6DOWNLOADSave images to output folder
7NOTIFYOptional: send to Telegram

Setup

pip install playwright requests
playwright install chromium

Decision Tree

What are you trying to do?

├── Download images from a board/user
│   └── Use: -u "URL" -s [scrolls]
│
├── Get highest quality possible
│   └── Use: -q originals
│
├── Get smaller/faster downloads
│   └── Use: -q 736x or 236x
│
├── Send images to phone
│   └── Use: --telegram --token X --chat Y
│
├── Resume interrupted scrape
│   └── Use: --resume
│
└── Debug issues
    └── Use: -v (verbose logging)

Quality Selection Decision

QualityUse CaseFile Size
------------------------------
originalsBest quality, archivingLargest
736xGood balanceMedium
474xThumbnail qualitySmall
236xPreview onlySmallest
allSave every versionLargest total

Usage

Command Line

python scrape_pinterest.py -u "URL" [options]
OptionDescriptionDefault
------------------------------
-u, --urlPinterest URL (required)-
-s, --scrollsNumber of scrolls50
-o, --outputOutput folder./pinterest_output
-q, --qualityQuality: originals/736x/474x/236x/alloriginals
-v, --verboseEnable verbose loggingfalse
--telegramSend images to Telegramfalse
--tokenTelegram bot token-
--chatTelegram chat ID-
--resumeResume from previous scrapefalse
--dedupSkip duplicatestrue
--no-dedupDisable deduplication-
--telegram-onlyOnly send existing filesfalse

Common Examples

# Basic scrape (50 scrolls, originals, current dir)
python scrape_pinterest.py -u "URL"

# Verbose mode (logs to console + scrape.log)
python scrape_pinterest.py -u "URL" -v

# More scrolls, custom output, medium quality
python scrape_pinterest.py -u "URL" -s 100 -o ./output -q 736x -v

# With Telegram delivery
python scrape_pinterest.py -u "URL" --telegram --token "TOKEN" --chat "CHAT_ID"

# Resume interrupted scrape
python scrape_pinterest.py -u "URL" --resume -v

# Show help
python scrape_pinterest.py --help

Python API

This tool is CLI-based. Run it from your Python code:

import subprocess
import os

# Run the scraper
result = subprocess.run(
    ['python3', 'scrape_pinterest.py', '-u', 'URL', '-s', '50', '-q', 'originals'],
    cwd='./scripts',
    capture_output=True,
    text=True
)

print(result.returncode)  # 0 = success
print(result.stdout)

Features

FeatureDescription
----------------------
Infinite ScrollAutomatic scrolling loads more images
Quality Optionsoriginals/736x/474x/236x/all
TelegramSend directly to Telegram
DeduplicationHash-based duplicate detection
ResumeContinue from previous scrape
URL TypesBoards, user profiles, search results
Verbose Logging-v flag, logs to console + scrape.log

Verbose Logging

Use -v or --verbose for detailed logging:

python scrape_pinterest.py -u "URL" -v

What gets logged:

  • Scroll progress (every 10 scrolls)
  • Images found per scroll
  • Download progress (X/Y)
  • Telegram send status
  • Errors and warnings

Log files:

  • Console: INFO level
  • scrape.log: DEBUG level (detailed)

Troubleshooting

Problem: No images downloaded

  • Cause: Not enough scrolls, Pinterest didn't load
  • Fix: Increase -s value (try 100-200)

Problem: "Browser not found"

  • Cause: Playwright not installed
  • Fix: playwright install chromium

Problem: SSL certificate errors (Mac)

  • Cause: macOS SSL issues
  • Fix: Use verify=False in requests calls

Problem: Duplicate images

  • Cause: Deduplication disabled or failed
  • Fix: Use --dedup flag (default: on)

Problem: Resume not working

  • Cause: State file missing or URL changed
  • Fix: Use same URL as original, check .scrape_state.json

Problem: Telegram not sending

  • Cause: Invalid token/chat ID, rate limiting
  • Fix: Verify bot token, check chat ID, Telegram limits 100 images/batch

Problem: Verbose logs not writing

  • Cause: File permission issue
  • Fix: Check write permissions in output directory

Self-Check

  • [ ] Pinterest URL is valid (board/user/search)
  • [ ] Playwright installed: playwright install chromium
  • [ ] Quality selected appropriately for use case
  • [ ] Output directory exists or is writable
  • [ ] For Telegram: token and chat ID correct
  • [ ] For resume: using same URL as original scrape

Notes

  • Pinterest loads dynamically - scrolling required for more images
  • Use verify=False for requests (Mac SSL issues)
  • State saved to .scrape_state.json for resume
  • Telegram limited to 100 images per batch
  • Verbose mode writes detailed logs to scrape.log

Quick Reference

TaskCommand
---------------
Basic scrapepython scrape_pinterest.py -u "URL"
Verbose debugpython scrape_pinterest.py -u "URL" -v
High qualitypython scrape_pinterest.py -u "URL" -q originals
Fast/smallpython scrape_pinterest.py -u "URL" -q 236x
Send to Telegrampython scrape_pinterest.py -u "URL" --telegram --token X --chat Y
Resumepython scrape_pinterest.py -u "URL" --resume
Custom outputpython scrape_pinterest.py -u "URL" -o ./myfolder

版本历史

共 1 个版本

  • v1.1.0 当前
    2026-03-30 00:05 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

content-creation

Baidu Wenku AIPPT

ide-rea
使用百度文库 AI 智能生成 PPT,自动根据内容选择模板。
★ 66 📥 46,224
data-analysis

Skill Maker

kexu9
从头创建新的代理技能。适用于:①构建特定功能;②将工作流转换为可复用技能;③设计技能结构……
★ 0 📥 734
content-creation

AdMapix

fly0pants
广告情报与应用数据分析助手,支持搜索广告素材、分析应用排名、下载量、收入及市场洞察,用于广告素材和竞品分析。
★ 295 📥 136,517