发现一个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))
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))