Python web scraping: difference between sleep and request(page, timeout=x)
问题 When scraping multiple websites in a loop, I notice there is a rather large difference in speed between, sleep(10) response = requests.get(url) and, response = requests.get(url, timeout=10) That is, timeout is much faster. Moreover, for both set-ups I expected a scraping duration of at least 10 seconds per page before requesting the next page, but this is not the case. Why is there such a difference in speed? Why is the scraping duration per page less than 10 seconds? I now use