Skip to main content

Scrape Simple

A web scraper that uses Tor for anonymity and supports text and media extraction.

Features

  • Tor integration for anonymous web scraping
  • Extract text content from web pages
  • Extract media files (images, videos) above a specified size
  • Optional Russian text simplification using Natasha
  • Optional AI-based image description using BLIP

Installation

pip install scrape-simple

Optional Dependencies

For Russian text simplification:

pip install scrape-simple[russian]

For AI image descriptions:

pip install scrape-simple[ai]

For all features:

pip install scrape-simple[russian,ai]

Usage

Command Line

# Basic usage
scrape-simple https://example.com

# Advanced usage
scrape-simple https://example.com --depth 3 --min-media-size 20480 --simplify-ru --ai-describe-media

Python API

from scrape_simple import WebScraper, SiteContent

# Create scraper
scraper = WebScraper(
    root_url="https://example.com",
    max_depth=2,
    use_existing_tor=True,
    min_media_size=10240,  # 10KB minimum for media files
    simplify_ru=False,
    ai_describe_media=False
)

# Start scraping
site_content = scraper.start()

# Access results
for page in site_content.TextPages:
    print(f"Page: {page.url}, Content length: {len(page.content)}")

for media in site_content.MediaContentList:
    print(f"Media: {media.url}, Type: {media.media_type}, Description: {media.description}")

# Create scraper with media extraction disabled
scraper = WebScraper(
    root_url="https://example.com",
    max_depth=2,
    use_existing_tor=True,
    skip_media=True  # Disable media extraction
)

Requirements

  • Python 3.6+
  • Tor (must be installed separately)

Command Line Arguments

Argument Description
url The URL of the site to scrape
--depth, -d The depth level for crawling (default: 2)
--use-existing-tor, -t Use existing Tor instance if available
--output, -o Output JSON file (default: output.json)
--history-file File to store visited URLs for this run (default: .scrape_history)
--simplify-ru Simplify Russian text using Natasha
--min-media-size Minimum file size for media in bytes (default: 100KB)
--ai-describe-media Use AI to generate descriptions for media files
--skip-media Disable media extraction completely
--max-retries Maximum number of retries for failed requests (default: 3)

Anti-Bot Protection Handling

Scrape Simple includes features to bypass common anti-bot protections:

  • Browser-like request headers
  • Random delays between requests
  • Tor IP rotation for 403/429 errors
  • Configurable retry mechanism

Metadata

Release files for scrape-simple 0.1.3

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

Source distribution (sdist)

Source distribution for scrape-simple 0.1.3
File Size Uploaded Provenance Actions
scrape_simple-0.1.3.tar.gz 16.2 kB Without provenance Details for scrape_simple-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for scrape-simple 0.1.3
File Interpreter ABI Platform Actions
scrape_simple-0.1.3-py3-none-any.whl Python 3 none any Details for scrape_simple-0.1.3-py3-none-any.whl

Total release size: 34.2 kB

Release files / scrape_simple-0.1.3.tar.gz

Download URL scrape_simple-0.1.3.tar.gz
Size 16.2 kB
Tags Source
SHA-256 checksum
How to use checksums
dce1946e2ac6209a01c241a55c6cfc1b3dad16c081680b0b7948ede426bcc10a
BLAKE2b-256 checksum
How to use checksums
1378e061498d89abd10f34d9b2abd4c5b6785cafbfa6f3051c7d8ad02da4b774
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Release files / scrape_simple-0.1.3-py3-none-any.whl

Download URL scrape_simple-0.1.3-py3-none-any.whl
Size 18.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dcdf6e3430523d5ee5fc8030ae09efd1a55b261115f812d784a74f97de295b90
BLAKE2b-256 checksum
How to use checksums
b2903f6ff8890bb4476c72b7fd2fe5887065964a0730b2d7b845febd4523d944
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.3

Security for scrape-simple 0.1.3

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.

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