如何强制阻止我的抓取工具上次抓取特定网址?

时间:2017-06-27 12:59:06

标签: python beautifulsoup scrapy web-crawler html-parsing

我正在制作一个抓取工具,以找出最近添加的YouTube视频,我希望在它到达旧视频时停止我的抓取工具(在之前的回合中抓取)。我没有使用scrapy和beautifulsoup我正在使用python库。请建议我任何选项

1 个答案:

答案 0 :(得分:0)

没有简单的检查和通过工作?

if video in list_of_crawled_videos:
    pass
else:
    list_of_crawled_videos.append(video)