diff --git a/newspaper/article.py b/newspaper/article.py index 5fe75d88..82864188 100644 --- a/newspaper/article.py +++ b/newspaper/article.py @@ -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)