mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-01-04 07:03:44 +01:00
ffnet cover images changed? Or broken?
This commit is contained in:
parent
9a25c9d6f7
commit
b9cf7e2a64
1 changed files with 9 additions and 7 deletions
|
|
@ -288,13 +288,15 @@ class FanFictionNetSiteAdapter(BaseSiteAdapter):
|
|||
if get_cover:
|
||||
# Try the larger image first.
|
||||
cover_url = ""
|
||||
try:
|
||||
img = soup.select('img.lazy.cimage')
|
||||
cover_url=img[0]['data-original']
|
||||
except:
|
||||
img = soup.select('img.cimage')
|
||||
if img:
|
||||
cover_url=img[0]['src']
|
||||
# try:
|
||||
# img = soup.select_one('img.lazy.cimage')
|
||||
# cover_url=img['data-original']
|
||||
# except:
|
||||
## Nov 19, 2020, ffnet lazy cover images returning 0 byte
|
||||
## files.
|
||||
img = soup.select_one('img.cimage:not(.lazy)')
|
||||
if img:
|
||||
cover_url=img['src']
|
||||
logger.debug("cover_url:%s"%cover_url)
|
||||
|
||||
authimg_url = ""
|
||||
|
|
|
|||
Loading…
Reference in a new issue