Fundemantal Scrapy support for Scrape.do API
Project description
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))
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_do-0.1.3-py3-none-any.whl
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
scrapy_scrapedo-0.1.3.tar.gz
(3.6 kB
view details)
Built Distribution
File details
Details for the file scrapy_scrapedo-0.1.3.tar.gz
.
File metadata
- Download URL: scrapy_scrapedo-0.1.3.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | df71760cf66037186c62351affe1532b51507a3eabaa8ea90d4c12a8e21d9a0d |
|
MD5 | 0c8f220b481c7aec8687daf5463b553d |
|
BLAKE2b-256 | 2fefc27de81ede817f08f406c121c82ff7fe8fc1db310fbfa672d4e2c335ba4d |
File details
Details for the file scrapy_scrapedo-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: scrapy_scrapedo-0.1.3-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 508e483f82f1a1685b1c6dcc836124792f77ca57cbae270346e1298226d89123 |
|
MD5 | 7890cdfae7f4251f9543249be30276eb |
|
BLAKE2b-256 | d3e8478083043245c2939365b1c4edb0cbf598ee52da044222e1768fc4017cac |