scrapy newspaper bug

来源:互联网 发布:vue.js 如何防止xss 编辑:程序博客网 时间:2024/05/22 01:58
发现一个newspaper的bug,在github上已修复,但pip下载的包还是有这个错
fix for "jpeg error with PIL, Can't convert 'NoneType' object to str implicitly"


修复办法: 打开python27/Lib/site-packages/newspaper/images.py
class Scraper:
    def largest_image_url:
把log.debug('using max img ' + max_url)
改为log.debug('using max img {}'.format(max_url))
原创粉丝点击