admin管理员组

文章数量:1271802

In the situation of scraping 100 URLs,

It can be broadly divided into 3 stages.

  1. Stage of accessing the URL
  2. Stage of waiting for the page to load
  3. Stage of parsing and retrieving the data on the page

Of these, stage 2 takes the most time

If you don't use coroutines, you repeat stages 1->2->3 100 times

If you use coroutines, in what situations can you apply them to reduce time?

本文标签: How can we use coroutines in web scrapingStack Overflow