Ben Chuanlong Du's Blog

It is never too late to learn.

Hands on the requests Module in Python

Comments

  1. It is suggested that you use the requests module instead of urllib unless you want to have minimal 3rd-party dependencies.

  2. Response.raise_for_status is a convenient method for raising an exception corresponding to the HTTP status code.