原地址 http://blog.sina.com.cn/s/blog_4701280b0102elmo.html
start_urls =['http://blog.sina.com.cn']
rules = [Rule(LinkExtractor(allow=['/s/blog_4701280b0102e[\da-zA-Z]+']), 'parse_torrent')]
rules里的正则表达式(黑体倾斜的)对吗?
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
后面的
.html没有匹配,这样就匹配不到完整的URL了。应该加上后面的
.html,正则规则如下:/s/blog_4701280b0102e[\da-zA-Z]+.html不知道你是想要匹配出什么内容