mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-05-08 12:36:11 +02:00
Enable pagecache for base_efiction.
This commit is contained in:
parent
e3217dfed6
commit
623158bb01
3 changed files with 5 additions and 3 deletions
|
|
@ -554,6 +554,7 @@ internalize_text_links:true
|
|||
use_pagecache:false
|
||||
|
||||
[base_efiction]
|
||||
use_pagecache:true
|
||||
|
||||
## At the time of writing, eFiction Base adapters allow downloading
|
||||
## the whole story in bulk using the 'Print' feature. If 'bulk_load'
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ class BaseEfictionAdapter(BaseSiteAdapter):
|
|||
or getMessageThereIsNoSuchAccount in html \
|
||||
or getMessageWrongPassword in html
|
||||
|
||||
def _fetch_to_soup(self, url):
|
||||
def _fetch_to_soup(self, url, usecache=False):
|
||||
"""
|
||||
Fetch a HTML document, fix it and parse it to BeautifulSoup.
|
||||
|
||||
|
|
@ -215,7 +215,7 @@ class BaseEfictionAdapter(BaseSiteAdapter):
|
|||
|
||||
Makes image links absolute so they can be downloaded
|
||||
"""
|
||||
html = self.get_request(url)
|
||||
html = self.get_request(url,usecache=usecache)
|
||||
|
||||
# Some site use old, old-school Comments <!- comment -> (single dash)
|
||||
html = re.sub("<!-.+?->", "", html)
|
||||
|
|
@ -374,7 +374,7 @@ class BaseEfictionAdapter(BaseSiteAdapter):
|
|||
if self.getMessageRegisteredUsersOnly() in errorDiv.prettify():
|
||||
if not self.triedLoggingIn:
|
||||
self.performLogin(self.url)
|
||||
soup = self._fetch_to_soup(printUrl)
|
||||
soup = self._fetch_to_soup(printUrl,usecache=False)
|
||||
errorDiv = soup.find("div", "errortext")
|
||||
self.triedLoggingIn = True
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -581,6 +581,7 @@ internalize_text_links:true
|
|||
use_pagecache:false
|
||||
|
||||
[base_efiction]
|
||||
use_pagecache:true
|
||||
|
||||
## At the time of writing, eFiction Base adapters allow downloading
|
||||
## the whole story in bulk using the 'Print' feature. If 'bulk_load'
|
||||
|
|
|
|||
Loading…
Reference in a new issue