Stories from the Web Crawling trenches in Timeout

Why Your Python Requests Timeout May Not Be Timing Out As Expected

Author: Mohan Ganesan

Date: Feb 3, 2024

When using the requests library in Python, you can specify a timeout value to prevent your code from hanging indefinitely if a request gets stuck.

Handling Errors Gracefully When URLs Fail in Python Requests

Author: Mohan Ganesan

Date: Feb 3, 2024

Python Requests module provides built-in error handling for HTTP requests. Common errors include ConnectionError, Timeout, HTTPError, and RequestException. Handling errors gracefully ensures resilient applications.

Tired of getting blocked while scraping the web?

ProxiesAPI handles headless browsers and rotates proxies for you.
Get access to 1,000 free API credits, no credit card required!