Skip to main content

Scrapydo

Scrapy wrapper for running Scrapy spiders with Scrapedo API.

Install

# get it from github
pip3 install git+https://github.com/scrape-do/scrapy-scrapedo

# or from pypi
pip3 install scrapy-scrapedo

Usage

from scrapydo import scrapy, scrapedo


class ScrapedoSampleCrawler(scrapy.Spider):
    name = "Scrape-do Sample Crawler"
    def __init__(self):
        super().__init__(scrapedo.RequestParameters(
        token="TOKEN", # Get your Scrape.do token from: dashboard.scrape.do
        params={
            "geoCode":"us",
            "super":False,
            "render":True,
            "playWithBrowser":[
                {"Action":"Click","Selector":"#manpage > div.mp > ul > li:nth-child(3) > a"},
                {"Action":"Wait","Timeout":2000},
                {"Action":"Execute","Execute":"document.URL"}
            ],
        }))
        
    def start_requests(self):
        urls = [
            'https://httpbin.co/',
        ]
        
        for url in urls:
            yield self.Request(url=url, callback=self.parse)
    def parse(self, response):
        print(response.body)
        print("target:",self.target_url(response))
            

You can also use the proxy mode to use the Scrape.do proxy service.

from scrapydo import scrapy, scrapedo

class ScrapedoSampleCrawler(scrapy.Spider):
    name = "Scrape-do Sample Crawler"
    def __init__(self):
        super().__init__(scrapedo.RequestParameters(
        token="TOKEN", # Get your Scrape.do token from: dashboard.scrape.do
        params={
            "geoCode":"uk",
            "super":True,
        },
        proxy_mode=True,
        ))
    
    def start_requests(self):
        urls = [
            'https://httpbin.co/headers',
        ]
        
        for url in urls:
            yield self.Request(url=url, callback=self.parse)
    def parse(self, response):
        print(response.body)
        print("target:",self.target_url(response))
        
    

Build

You may prefer to build the package from source code.

pip3 install setuptools wheel
python3 setup.py sdist bdist_wheel

Finally, you can install the package from the generated wheel file.

pip3 install dist/scrapy_scrapedo-0.1.4-py3-none-any.whl

Metadata

Release files for scrapy-scrapedo 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 scrapy-scrapedo 0.1.4
File Size Uploaded Provenance Actions
scrapy_scrapedo-0.1.4.tar.gz 4.0 kB Without provenance Details for scrapy_scrapedo-0.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for scrapy-scrapedo 0.1.4
File Interpreter ABI Platform Actions
scrapy_scrapedo-0.1.4-py3-none-any.whl Python 3 none any Details for scrapy_scrapedo-0.1.4-py3-none-any.whl

Total release size: 8.7 kB

Release files / scrapy_scrapedo-0.1.4.tar.gz

Download URL scrapy_scrapedo-0.1.4.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f2894998186f34d762a131c381ef332bc3fa7213ebdada1f6ed7c8911c998c8c
BLAKE2b-256 checksum
How to use checksums
8f06673d7c7adcad09e96fe0d2dfd8a43bba5a81a005250c393fdd02b210e3c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.5

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

Download URL scrapy_scrapedo-0.1.4-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5b871edfc7b8c685d376d163238f9650fb19bb8547250f493b5b561b8f886002
BLAKE2b-256 checksum
How to use checksums
fea3bc82a319f070a78967f55d9a9ed384199f2ded0fe5e66be025c448260423
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.5

Security for scrapy-scrapedo 0.1.4

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.

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files No provenance

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