Skip to main content
Use scraper_run to either test a scraper in development or execute a saved scraper to download files. Test mode lets you validate your discover_files() logic and preview the file list it returns — without downloading anything or touching the workspace. Run mode dispatches the scraper to download all discovered files and triggers the full processing pipeline.

Parameters

string
required
The name of the scraper to run or test.
boolean
When true, runs the scraper in test mode. Executes discover_files() and returns the files found without downloading. Requires code and url.
string
The Python scraper code to execute. Required in test mode.
string
The URL to pass to the scraper. Required in test mode.
boolean
When true, overwrites existing file metadata even if the file has already been discovered. Use this to pick up date or filename corrections after updating scraper code.
string
The workspace to write discovered files into. Required for non-test runs.

Modes

Test mode runs your discover_files() implementation against the target URL and returns the file metadata it produces. No files are downloaded and no workspace records are created.Use test mode during development to:
  • Confirm your scraper can reach the target site
  • Verify the returned url, filename, date, and page_url values look correct
  • Catch date format errors before they are rejected by the pipeline
Test mode previews up to 5 files. If more files are found, the response reports the total count and notes how many were omitted.
Example response:
If the test times out (over 20 seconds), the most common causes are: the target site is blocking automated requests (WAF such as Akamai or Cloudflare), or an infinite loop in discover_files(). For sites that block scraping, use scraper_upload_urls instead.