21/28
Part 5 of 6 · Errors and shared stateWatch
Watch · 7 min

This section's worker design written with asyncio. A URL queue, a fixed set of worker tasks, a seen set updated as links are found, task_done in a finally and join to finish, then the workers cancelled. Links go through urljoin and urldefrag before a domain check.

Intro to async Python | Writing a Web Crawler · mCoding · Feb 2023YouTube