mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-05-08 12:36:11 +02:00
fix: cover image AttributeError brought by "failedtoload" inspecting update
This commit is contained in:
parent
17331e9eb3
commit
f55f9ae902
2 changed files with 2 additions and 2 deletions
|
|
@ -184,7 +184,7 @@ class FimFictionNetSiteAdapter(BaseSiteAdapter):
|
|||
if storyImage:
|
||||
coverurl = storyImage['data-fullsize']
|
||||
# try setting from data-fullsize, if fails, try using data-src
|
||||
if self.setCoverImage(self.url,coverurl)[0].startswith("failedtoload"):
|
||||
if str(self.setCoverImage(self.url,coverurl)[0] or '').startswith("failedtoload"):
|
||||
coverurl = storyImage['src']
|
||||
self.setCoverImage(self.url,coverurl)
|
||||
|
||||
|
|
|
|||
|
|
@ -289,7 +289,7 @@ class RoyalRoadAdapter(BaseSiteAdapter):
|
|||
if img:
|
||||
cover_url = img['src']
|
||||
# usually URL is for thumbnail. Try expected URL for larger image, if fails fall back to the original URL
|
||||
if self.setCoverImage(url,cover_url.replace('/covers-full/', '/covers-large/'))[0].startswith("failedtoload"):
|
||||
if str(self.setCoverImage(url,cover_url.replace('/covers-full/', '/covers-large/'))[0] or '').startswith("failedtoload"):
|
||||
self.setCoverImage(url,cover_url)
|
||||
# some content is show as tables, this will preserve them
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue