Skip to main content
Surfsky’s Scrapy integrations replace the download handler: each request is fetched by a cloud browser from a pool and comes back as an ordinary Scrapy response for your spider to parse.

Prerequisites

Set your API token and base URL. Both integrations require at least one proxy URL; unlike a direct API request, the account’s default pool is not used:
Create a Scrapy project if you do not have one:

Installation

Configuration

Add to surfsky_spider/settings.py:

Example spider

Save as surfsky_spider/spiders/example.py:
This integration does not expose BROWSER_SETTINGS or FINGERPRINT through CLOUD_BROWSER. Use the Playwright integration below if you need those settings.

Run the example

From the project directory:
results.json should contain an item with "title": "Example Domain".

Pool settings

A browser serves several requests before it is recycled, so do not assume each response comes from a fresh session. If startup repeats without producing responses, check the API host, token, and proxy URL, then limits. Start with one browser until the spider works.

Stop the sessions

The pool closes its browsers when the crawl finishes. After an interrupted crawl, list active sessions and stop any browser left running, or stop them all:
Otherwise each browser stops after its inactivity timeout, 30 seconds by default.