Stories from the Web Crawling trenches in HTTPError

Handling URL Errors Gracefully in Python urllib

Author: Mohan Ganesan

Date: Feb 6, 2024

Handle errors when working with URLs in Python using the urllib module. Catch HTTPError and URLError exceptions, and apply targeted handling and retries where applicable.

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!