mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-05-08 12:36:11 +02:00
Change for adapter_fanfictionnetadapter_fanfictionnet to make skip_author_cover work again.
This commit is contained in:
parent
fb6d4eee01
commit
6d117363ed
1 changed files with 7 additions and 2 deletions
|
|
@ -313,19 +313,24 @@ class FanFictionNetSiteAdapter(BaseSiteAdapter):
|
||||||
logger.debug("authimg_url:%s"%authimg_url)
|
logger.debug("authimg_url:%s"%authimg_url)
|
||||||
|
|
||||||
## ffnet uses different sizes on auth & story pages, but same id.
|
## ffnet uses different sizes on auth & story pages, but same id.
|
||||||
|
## Old URLs:
|
||||||
## //ffcdn2012t-fictionpressllc.netdna-ssl.com/image/1936929/150/
|
## //ffcdn2012t-fictionpressllc.netdna-ssl.com/image/1936929/150/
|
||||||
## //ffcdn2012t-fictionpressllc.netdna-ssl.com/image/1936929/180/
|
## //ffcdn2012t-fictionpressllc.netdna-ssl.com/image/1936929/180/
|
||||||
|
## After Dec 2020 ffnet changes:
|
||||||
|
## /image/6472517/180/
|
||||||
|
## /image/6472517/150/
|
||||||
try:
|
try:
|
||||||
cover_id = cover_url.split('/')[4]
|
cover_id = cover_url.split('/')[-3]
|
||||||
except:
|
except:
|
||||||
cover_id = None
|
cover_id = None
|
||||||
try:
|
try:
|
||||||
authimg_id = authimg_url.split('/')[4]
|
authimg_id = authimg_url.split('/')[-3]
|
||||||
except:
|
except:
|
||||||
authimg_id = None
|
authimg_id = None
|
||||||
|
|
||||||
## don't use cover if it matches the auth image.
|
## don't use cover if it matches the auth image.
|
||||||
if cover_id and authimg_id and cover_id == authimg_id:
|
if cover_id and authimg_id and cover_id == authimg_id:
|
||||||
|
logger.debug("skip_author_cover: cover_url matches authimg_url: don't use")
|
||||||
cover_url = None
|
cover_url = None
|
||||||
|
|
||||||
if cover_url:
|
if cover_url:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue