Rule object is not iterable

问题:
exceptions.TypeError: 'Rule' object is not iterable

原因:

1
2
3
rules =(
Rule(SgmlLinkExtractor(allow = ()) ,callback = 'parse_item')
)

不是可以迭代的对象

修改为:

1
rules =(Rule(SgmlLinkExtractor(allow = ()) ,callback = 'parse_item'),)

Profeel wechat
添加微信,加我好友,与我直接交流!

坚持原创技术分享,您的支持将鼓励我继续创作!