mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-05-07 12:02:25 +02:00
This commit is contained in:
parent
98f95a7da8
commit
f6dafecfa1
4 changed files with 14 additions and 12 deletions
|
|
@ -1265,11 +1265,11 @@ remove_transparency: true
|
|||
## kept.)
|
||||
#dedup_img_files:false
|
||||
|
||||
## If set true, FFF will use the img tag's own src URL as the HTTP
|
||||
## Referer instead of the page URL. This is useful for some image
|
||||
## hosting sites that watermark or return HTML instead of image data
|
||||
## without it.
|
||||
#force_img_self_referer:false
|
||||
## If set, and the img tag's URL matches the regular expression, FFF
|
||||
## will use the img tag's own src URL as the HTTP Referer instead of
|
||||
## the page URL. This is useful for some image hosting sites that
|
||||
## watermark or return HTML instead of image data without it.
|
||||
#force_img_self_referer_regexp:gelbooru.com|photobucket.com
|
||||
|
||||
## if the <img> tag doesn't have a div or a p around it, nook gets
|
||||
## confused and displays it on every page after that under the text
|
||||
|
|
|
|||
|
|
@ -375,7 +375,7 @@ def get_valid_keywords():
|
|||
'dateUpdated_format',
|
||||
'default_cover_image',
|
||||
'force_cover_image',
|
||||
'force_img_referer',
|
||||
'force_img_self_referer_regexp',
|
||||
'description_limit',
|
||||
'do_update_hook',
|
||||
'use_archived_author',
|
||||
|
|
|
|||
|
|
@ -1264,11 +1264,11 @@ remove_transparency: true
|
|||
## kept.)
|
||||
#dedup_img_files:false
|
||||
|
||||
## If set true, FFF will use the img tag's own src URL as the HTTP
|
||||
## Referer instead of the page URL. This is useful for some image
|
||||
## hosting sites that watermark or return HTML instead of image data
|
||||
## without it.
|
||||
#force_img_self_referer:false
|
||||
## If set, and the img tag's URL matches the regular expression, FFF
|
||||
## will use the img tag's own src URL as the HTTP Referer instead of
|
||||
## the page URL. This is useful for some image hosting sites that
|
||||
## watermark or return HTML instead of image data without it.
|
||||
#force_img_self_referer_regexp:gelbooru.com|photobucket.com
|
||||
|
||||
## if the <img> tag doesn't have a div or a p around it, nook gets
|
||||
## confused and displays it on every page after that under the text
|
||||
|
|
|
|||
|
|
@ -1548,7 +1548,9 @@ class Story(Requestable):
|
|||
# and authors who link images that watermark or
|
||||
# don't work anymore.
|
||||
refererurl = parenturl
|
||||
if self.getConfig("force_img_self_referer"):
|
||||
if( self.getConfig("force_img_self_referer_regexp") and
|
||||
re.search(self.getConfig("force_img_self_referer_regexp"),
|
||||
url) ):
|
||||
refererurl = url
|
||||
logger.debug("Use Referer:%s"%refererurl)
|
||||
imgdata = fetch(imgurl,referer=refererurl)
|
||||
|
|
|
|||
Loading…
Reference in a new issue