Chapter 12. Concurrent Web Requests
This chapter will focus on the application of concurrency in making web requests. Intuitively, making requests to a web page to collect information about it is independent to applying the same task to another web page. Concurrency, specifically threading in this case, therefore can be a powerful tool that provides a significant speedup in this process. In this chapter, we will learn the fundamentals of web requests and how to interact with websites using Python. We will also see how concurrency can help us make multiple requests in an efficient way. Finally, we will look at a number of good practices in web requests.
In this chapter, we will cover the following concepts:
- The basics of web requests
- The requests module
- Concurrent web requests
- The problem of timeout
- Good practices in making web requests