def work(): while True: url=queue.get() Spider.crawling(threading.current_thread().name,url) queue.task_done()