Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions newspaper/article.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,11 @@ def set_reddit_top_img(self):
try:
s = images.Scraper(self)
self.set_top_img(s.largest_image_url())
except TypeError as e:
if "Can't convert 'NoneType' object to str implicitly" in e.args[0]:
log.debug("No pictures found. Top image not set, %s" % e)
else:
log.critical('jpeg error with PIL, %s' % e)
except Exception as e:
log.critical('jpeg error with PIL, %s' % e)

Expand Down