mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
News download: Don't fail if the cover url is invalid
This commit is contained in:
parent
5c7db72614
commit
2c5b79f79c
@ -806,7 +806,7 @@ class BasicNewsRecipe(Recipe):
|
|||||||
|
|
||||||
return index
|
return index
|
||||||
|
|
||||||
def download_cover(self):
|
def _download_cover(self):
|
||||||
self.cover_path = None
|
self.cover_path = None
|
||||||
try:
|
try:
|
||||||
cu = self.get_cover_url()
|
cu = self.get_cover_url()
|
||||||
@ -839,6 +839,14 @@ class BasicNewsRecipe(Recipe):
|
|||||||
f.write(mi.cover_data[1])
|
f.write(mi.cover_data[1])
|
||||||
self.cover_path = cpath
|
self.cover_path = cpath
|
||||||
|
|
||||||
|
def download_cover(self):
|
||||||
|
try:
|
||||||
|
self._download_cover()
|
||||||
|
except:
|
||||||
|
self.log.exception('Failed to download cover')
|
||||||
|
self.cover_path = None
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def default_cover(self, cover_file):
|
def default_cover(self, cover_file):
|
||||||
'''
|
'''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user