<p>我正在制作一个网络爬虫,我使用以下两个功能:</p>
<pre><code>#Each queued link is the new job
def create_jobs():
for link in file_to_set(QUEUE_FILE):
queue.put(link)
queue.join()
crawl()
#Check if there are items in the queue then solve them
def crawl():
queued_links = file_to_set(QUEUE_FILE)
if len(queued_links)>0:
print(str(len(queued_links))+' links in the queue')
create_jobs()
</code></pre>
<p>在这里爬行被称为第一。有时在抓取页面时,它会显示超出了最大递归深度,而有时不会。(我再次运行相同的脚本)。有人能解释一下有什么问题吗?你知道吗</p>
<p>请注意,我需要爬网的链接数量只有100个左右,这比python的限制要少。你知道吗</p>