Skip to main content

RobustCrawl

A library for robust cralwer based on proxy pool and token bucket, support browser and requests

Install

pip install robust_crawl
playwright install chrome
export OPENAI_API_KEY="yourkey"  
export OPENAI_API_BASE="your base" # optional

brew install go

brew install mihomo

set imported proxy file (.yml / .yaml) in ./config

Config

save it in ./config/robust_crawl_config.json

{
    "wait_sec": 10,
    "max_concurrent_requests": 500,
    "GPT": {
        "model_type": "gpt-3.5-turbo"
    },
    "TokenBucket": {
        "tokens_per_minute": 20,
        "bucket_capacity": 5,
        "url_specific_tokens": {
            "export.arxiv": {
                "tokens_per_minute": 19,
                "bucket_capacity": 1
            }
        }
    },
    "Proxy": {
        "is_enabled": true,
        "start_port": 33333,
        "proxies_dir": "./proxies"
    },
    "ContextPool": {
        "num_contexts": 2,
        "work_contexts": 15,
        "have_proxy": true,
        "duplicate_proxies": false,
        "ensure_none_proxies": true,
        "download_pdf": false,
        "downloads_path": "./output/browser_downloads",
        "preference_path": "./output/broswer_config",
        "context_lifetime": 60,
        "context_cooling_time": 1
    }
}

Metadata

Release files for robust-crawl 0.1.4

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

Source distribution (sdist)

Source distribution for robust-crawl 0.1.4
File Size Uploaded
robust_crawl-0.1.4.tar.gz 14.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for robust-crawl 0.1.4
File Interpreter ABI Platform
robust_crawl-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 30.5 kB

Release files / robust_crawl-0.1.4.tar.gz

Download URL robust_crawl-0.1.4.tar.gz
Size 14.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a4d9669186a38dfbc29773a782b57fcafe0bd6de8a494f2e400367b9cd4fa1e8
BLAKE2b-256 checksum
How to use checksums
81c4ef56c20a93573eea9a447bf84d22f13a01e434d458b9eac7f6a0d083edc7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.10

Release files / robust_crawl-0.1.4-py3-none-any.whl

Download URL robust_crawl-0.1.4-py3-none-any.whl
Size 16.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e209cb1ac2c10eb662acf1d2b87ec544f82f3cae4a4a709e273f89f0e4f9dcf3
BLAKE2b-256 checksum
How to use checksums
1c70590af9021d539c5cb36fe0e6f2a6168d52257a8f64f3c30f8f43f6afd2ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.10

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1

2 release files

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