Kyokoning / lofter_crawler

crawler
43 stars 7 forks source link

爬到某些文章时会报错中止 #3

Closed fsouls closed 4 years ago

fsouls commented 4 years ago

https://jinrilidong365.lofter.com/post/1b90e2_81fc53c Traceback (most recent call last): File "tool/crawler.py", line 33, in save_tag(cfg, str(tag)) File "E:\Program files\lofter_crawler-master\tool..\lib\user_pigeonhole.py", line 217, in save_tag _capture_blog(single_header, url, hot, cfg) File "E:\Program files\lofter_crawler-master\tool..\lib\user_pigeonhole.py", line 124, in _capture_blog if not ((cfg.TARGET.ARTICAL and artical_type) or (cfg.TARGET.PICTURE and not artical_type)): UnboundLocalError: local variable 'artical_type' referenced before assignment

又打扰您了,爬到某些blog的时候会出现这个问题

Kyokoning commented 4 years ago

您好,真诚地感谢您的反馈,这大大扩展了脚本的测试范围。测试之后发现我对网页版lofter的css了解不够,很多情况下网页版并不会给出是图片blog还是文字blog的显性提示,才会出现这个bug。更新移除了配置文件中过滤图片blog和文字blog的选项,强行解决了这个问题。