Python 网络爬虫:检查多个网页的子页面中的特定字符串

Python 网络爬虫:检查多个网页的子页面中的特定字符串,python,curl,web-crawler,Python,Curl,Web Crawler,我们将如何做到这一点: 我有一个包含大约160页的列表,每个页面有±5个子菜单。总的来说,我必须在800页中检查特定标记,并返回缺少特定标记的页面 到目前为止,我用Python提出了这个伪代码 for each URL in URL_list fetch pagesource for each submenu_link in pagesource fetch pagesource if string "<h2 class=\"subtitle

我们将如何做到这一点: 我有一个包含大约160页的列表,每个页面有±5个子菜单。总的来说,我必须在800页中检查特定标记,并返回缺少特定标记的页面

到目前为止,我用Python提出了这个伪代码

for each URL in URL_list
    fetch pagesource
    for each submenu_link in pagesource
        fetch pagesource
        if string "<h2 class=\"subtitle\">" is not in pagesource:
        print submenu_link + "subtitle missing"

你觉得怎么样?错误的方法?不知道我应该使用哪种网络爬虫库/模块或编程语言-欢迎推荐

我目前与wich合作,wich是Pyton中一个容易理解的网络爬虫

我链接了教程,因为它会让你比文档学习快得多。 玩得开心