the requests module lets you easily download files from the web without having to worry about complicated issues such as network errorsconnection problemsand data compression the requests module doesn' come with pythonso you'll have to install it first from the command linerun pip install --user requests (appendix has additional details on how to install third-party modules the requests module was written because python' urllib module is too complicated to use in facttake permanent marker and black out this entire paragraph forget ever mentioned urllib if you need to download things from the webjust use the requests module nextdo simple test to make sure the requests module installed itself correctly enter the following into the interactive shellimport requests if no error messages show upthen the requests module has been successfully installed downloading web page with the requests get(function the requests get(function takes string of url to download by calling type(on requests get()' return valueyou can see that it returns response objectwhich contains the response that the web server gave for your request 'll explain the response object in more detail laterbut for nowenter the following into the interactive shell while your computer is connected to the internetimport requests res requests get(type(resres status_code =requests codes ok true len(res text print(res text[: ]the project gutenberg ebook of romeo and julietby william shakespeare this ebook is for the use of anyone anywhere at no cost and with almost no restrictions whatsoever you may copy itgive it away or re-use it under the terms of the proje the url goes to text web page for the entire play of romeo and julietprovided on this book' site you can tell that the request for this web page succeeded by checking the status_code attribute of the response object if it is equal to the value of requests codes okthen everything went fine (incidentallythe status code for "okin the http protocol is you may already be familiar with the status code for "not found "web scraping