{
  "id": 23807550,
  "title": "Scraping past a 90 second proxy timeout with submit-and-poll jobs",
  "url": "https://urgent.news/2026/12/06/scraping-past-a-90-second-proxy-timeout-with-submit-and-poll-jobs",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-12-06T10:17:46.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/dannewton/scraping-past-a-90-second-proxy-timeout-with-submit-and-poll-jobs-2dka"
  },
  "original_language": null,
  "account": "When a scraping job takes longer than the HTTP connection timeout, a workaround is required. Proxy services like Cloudflare terminate connections after about 90 seconds. If the API call waits for the entire scrape, it fails for lengthy jobs, even if the scraping itself is successful. The solution involves using an asynchronous job API.\n\nThe pattern is simple in Python. First, the job is submitted and a unique job ID is returned instantly. Then, the status of the job is checked by polling until it's marked as \"completed\". Finally, the rows of the scraped data are fetched once the job is completed.\n\nThis method is used by LogPose, a scraping API for sites such as Amazon, Alibaba, and Instagram. Every endpoint follows this approach, allowing developers to write the polling loop once. It's a lightweight client that fetches the job ID, then collects the results at a specified interval until the job completes or times out.\n\nThe solution prevents the job from exceeding the proxy timeout, keeps secrets secure, and allows multiple searches to run simultaneously. Each job is processed independently, so the total time taken is roughly the time taken by the slowest job. If a job never completes, a timeout error is raised, preventing the script from hanging indefinitely. Failed jobs are treated as final results and the error is logged.\n\nThis pattern isn't limited to scraping. It can be applied to any slow API where the gateway timeout might be insufficient. It's a flexible solution that ensures robustness and reliability in handling long-running tasks.",
  "summary": "Scraping a big page can take longer than an HTTP connection allows. A proxy such as Cloudflare closes any connection after about 90 seconds. If your API call waits for the whole scrape, it will fail on large jobs even when the scrape itself works. The fix is an asynchronous job API. You submit, get a job id back at once, then poll. Here is the pattern in Python. The three calls # 1. Submit.…",
  "summary_source": "publisher",
  "key_points": [
    "Proxy services terminate connections after ~90 seconds",
    "Submit-and-poll jobs use asynchronous job API",
    "Allows multiple searches to run simultaneously"
  ],
  "editors_take": null,
  "opinion": false,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "outlets_capped": false,
    "also_reported_by": []
  },
  "machine_translated": false,
  "ai_generated": true,
  "disclaimer": "Accounts, briefs, key points, the editor’s take and translations are written by software from other outlets’ reporting and may contain errors. A summary whose summary_source is \"publisher\" is the outlet’s own feed text. Always check the linked original."
}