mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2025-12-06 08:52:55 +01:00
Add support for 'directimages' with use_browser_cache
Hook the configurable into the direct_fetcher logic already existing for flaresolverr Signed-off-by: Nicolas SAPA <nico@ByMe.at>
This commit is contained in:
parent
69872b922c
commit
a1d4fba728
1 changed files with 6 additions and 1 deletions
|
|
@ -744,10 +744,15 @@ class Story(Requestable):
|
|||
self.chapter_text_replacements_prepped = False
|
||||
|
||||
self.chapter_error_count = 0
|
||||
|
||||
# direct_fetcher is used for downloading image in some case
|
||||
# by using RequestsFetcher instead of the expected fetcher
|
||||
self.direct_fetcher = None
|
||||
if self.getConfig('use_flaresolverr_proxy'):
|
||||
logger.debug("use_flaresolverr_proxy:%s"%self.getConfig('use_flaresolverr_proxy'))
|
||||
if self.getConfig('use_flaresolverr_proxy') == 'directimages':
|
||||
if self.getConfig('use_browser_cache'):
|
||||
logger.debug("use_browser_cache:%s"%self.getConfig('use_browser_cache'))
|
||||
if self.getConfig('use_flaresolverr_proxy') == 'directimages' or self.getConfig('use_browser_cache') == 'directimages':
|
||||
from . import fetchers
|
||||
fetcher = fetchers.RequestsFetcher(self.getConfig,
|
||||
self.getConfigList)
|
||||
|
|
|
|||
Loading…
Reference in a new issue