首页 > 为什么/s/blog_4701280b0102elmo在正则表达生成器里生成不出来?

为什么/s/blog_4701280b0102elmo在正则表达生成器里生成不出来?

原地址 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里的正则表达式(黑体倾斜的)对吗?


不知道你是想要匹配出什么内容


后面的.html没有匹配,这样就匹配不到完整的URL了。
应该加上后面的.html,正则规则如下:
/s/blog_4701280b0102e[\da-zA-Z]+.html

【热门文章】
【热门文章】