Skip to content

Instantly share code, notes, and snippets.

@kshirsagarsiddharth
Created September 1, 2020 11:05
Show Gist options
  • Select an option

  • Save kshirsagarsiddharth/c6f5daf4f58a968ee84c3676ddfe8ffd to your computer and use it in GitHub Desktop.

Select an option

Save kshirsagarsiddharth/c6f5daf4f58a968ee84c3676ddfe8ffd to your computer and use it in GitHub Desktop.
crawler2
class Crawler(threading.Thread):
def __init__(self,base_url, links_to_crawl,have_visited, error_links,url_lock):
threading.Thread.__init__(self)
print(f"Web Crawler worker {threading.current_thread()} has Started")
self.base_url = base_url
self.links_to_crawl = links_to_crawl
self.have_visited = have_visited
self.error_links = error_links
self.url_lock = url_lock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment