Stories from the Web Crawling trenches in response

Handling HTTP Status Codes with Python Requests

Author: Mohan Ganesan

Date: Feb 3, 2024

When making HTTP requests in Python, it's important to check the status code of the response. The requests library makes this easy, allowing you to handle success and error codes correctly.

Handling 404 Errors when Making HTTP Requests in Python

Author: Mohan Ganesan

Date: Feb 3, 2024

Tips on handling 404 errors gracefully in Python code when making HTTP requests. Check response status code, log and notify, use try-except block.

Parsing JSON Responses from APIs in Python Requests

Author: Mohan Ganesan

Date: Feb 3, 2024

When working with APIs in Python, use response.json() to parse JSON data. Handle invalid JSON gracefully and check status codes and Content-Type before parsing.

Handling Errors with aiohttp ClientResponseError

Author: Mohan Ganesan

Date: Feb 22, 2024

Handle aiohttp ClientResponseError in Python for robust and user-friendly applications.

Why You May Not Get All Cookie Data with the Python Requests Module

Author: Mohan Ganesan

Date: Feb 3, 2024

Use Sessions or custom jars to ensure you have full cookie details when using Requests.

Handling Responses with urllib in Python

Author: Mohan Ganesan

Date: Feb 6, 2024

The urllib module in Python provides functionality for fetching data from URLs. Properly handling the response is important for robust code.

Hands-On Guide to Python Requests Status Codes

Author: Mohan Ganesan

Date: Nov 17, 2023

Status codes are a vital part of working with the Python Requests library. Learn how to access, interpret, and handle status codes in Python Requests for writing robust scripts and 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!