我想以以下格式对所有链接进行爬网:
http://example.com/index.php/comments/XXXXX
http://example.com/XXX1/index.php/comments/XXXXX
http://example.com/XXX2/index.php/comments/XXXX
http://example.com/XXX3/index.php/comments/XXXX
我定义了以下规则:
start_urls = ['http://example.com/']
rules = [Rule(SgmlLinkExtractor(allow=[r'\w+/index.php/comments/\w+']), callback='parse_blogpost', follow=True)]
但爬虫似乎只访问了这样的链接(http://example.com/index.php/comments/XXXXX),而没有访问这样的链接(http://example.com/XXX1/index.php/comments/XXXXX)。你知道吗
任何帮助都将不胜感激!你知道吗
目前没有回答
相关问题 更多 >
编程相关推荐