Skip to main content

DEPRECATION NOTICE

⚠️ IMPORTANT: This package is no longer maintained or supported. For the latest updates, please use our new package at scrapy-crawlbase-middleware.


ProxyCrawl API middleware for Scrapy

Processes Scrapy requests using ProxyCrawl services either with Normal or Javascript tokens

Installing

Choose a way of installing:

  • Clone the repository inside your Scrapy project and run the following:
python setup.py install
  • Or use PyPi Python package manager. pip install scrapy-proxycrawl-middleware

Then in your Scrapy settings.py add the following lines:

# Activate the middleware
PROXYCRAWL_ENABLED = True

# The ProxyCrawl API token you wish to use, either normal of javascript token
PROXYCRAWL_TOKEN = 'your token'

# Enable the middleware
DOWNLOADER_MIDDLEWARES = {
    'scrapy_proxycrawl.ProxyCrawlMiddleware': 610
}

Usage

Use the scrapy_proxycrawl.ProxyCrawlRequest instead of the scrapy built-in Request. The scrapy_proxycrawl.ProxyCrawlRequest accepts additional arguments, used in Proxy Crawl API:

from scrapy_proxycrawl import ProxyCrawlRequest

class ExampleScraper(Spider):

    def start_requests(self):
        yield ProxyCrawlRequest(
            "http://target-url",
            callback=self.parse_result
            device='desktop',
            country='US',
            page_wait=1000,
            ajax_wait=True,
            dont_filter=True
        )

The target url will be replaced with proxy crawl url and parameters will be encoded into the url by the middleware automatically.

If you have questions or need help using the library, please open an issue or contact us.


Copyright 2023 ProxyCrawl

Release files for scrapy-proxycrawl-middleware 1.2.0

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

Source distribution (sdist)

Source distribution for scrapy-proxycrawl-middleware 1.2.0
File Size Uploaded
scrapy-proxycrawl-middleware-1.2.0.tar.gz 5.3 kB Details

Release files / scrapy-proxycrawl-middleware-1.2.0.tar.gz

Download URL scrapy-proxycrawl-middleware-1.2.0.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
efa750d0a86ab5ae9da326558ba33d5ee79da0f58746484e99e7c554cbd5c0ac
BLAKE2b-256 checksum
How to use checksums
609039114f4c72a63e7d7513474967c45cca8857a478bb1cbe169c8a9abe020f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.8.3 requests/2.27.1 setuptools/41.2.0 requests-toolbelt/1.0.0 tqdm/4.64.1 CPython/2.7.18

Release history Release notifications | RSS feed

This release

1.2.0 This release

1 release file

1.1.0

3 release files

1.0.2

3 release files

1.0.1

3 release files

1.0.0

3 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