Stories from the Web Crawling trenches in sessions

Persisting Cookies with Python Requests for Effective Web Scraping

Author: Mohan Ganesan

Date: Oct 22, 2023

Cookies allow web scrapers to store and send session data. Python Requests library provides cookie persistence with Sessions, serialization, and rotating User Agents.

Using Proxies with Python Requests

Author: Mohan Ganesan

Date: Oct 22, 2023

Python requests library simplifies HTTP requests and API calls. Proxies help avoid IP blocking. Configure proxies using a dictionary or environment variables. Authenticate requests with credentials. Use sessions for persistent data. Disable SSL verification if trusted. Adjust timeouts and retries for robust requests.

Mastering Sessions Cookies with Python Requests

Author: Mohan Ganesan

Date: Oct 22, 2023

Cookies and sessions are essential for effective web scraping. Python's Requests library makes it easy to leverage sessions and cookies for robust scraping. Learn how to create a session, persist cookies, set custom cookies, and more. By mastering session techniques, you can scrape complex sites requiring authentication and state management.

The Redirect Ninja's Guide to Mastering Python Requests

Author: Mohan Ganesan

Date: Oct 31, 2023

Learn how to handle redirects in web scraping using Python's Requests module. Master techniques like sessions, custom redirect handlers, and inspecting redirects.

Setting Cookies in aiohttp Requests

Author: Mohan Ganesan

Date: Mar 3, 2024

Set cookies in Python aiohttp requests to handle sessions, authorization, or preferences. aiohttp seamlessly handles cookies for easy automation and scripting.

Mastering Urllib Sessions in Python for Effective Web Scraping

Author: Mohan Ganesan

Date: Feb 8, 2024

Urllib sessions allow persisting specific parameters across multiple requests. This is very useful for web scraping authenticated sites or sites that track browser state.

Why use Python requests?

Author: Mohan Ganesan

Date: Feb 20, 2024

The Requests library is a popular tool for Python developers to make HTTP requests and APIs easier. It saves time compared to urllib module and provides features like JSON decoding and SSL verification. Requests is recommended for web API calls, web scraping, and more.

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!