mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-04-26 17:02:36 +02:00
Make adapter_storiesonlinenet.py use page cache.
This commit is contained in:
parent
12ce63d5c9
commit
68381bc30b
1 changed files with 9 additions and 2 deletions
|
|
@ -96,7 +96,7 @@ class StoriesOnlineNetAdapter(BaseSiteAdapter):
|
|||
logger.debug("Will now login to URL (%s) as (%s)" % (loginUrl,
|
||||
params['theusername']))
|
||||
|
||||
d = self._fetchUrl(loginUrl, params)
|
||||
d = self._fetchUrl(loginUrl, params,usecache=False)
|
||||
|
||||
if "My Account" not in d : #Member Account
|
||||
logger.info("Failed to login to URL %s as %s" % (loginUrl,
|
||||
|
|
@ -106,6 +106,13 @@ class StoriesOnlineNetAdapter(BaseSiteAdapter):
|
|||
else:
|
||||
return True
|
||||
|
||||
def use_pagecache(self):
|
||||
'''
|
||||
adapters that will work with the page cache need to implement
|
||||
this and change it to True.
|
||||
'''
|
||||
return True
|
||||
|
||||
## Getting the chapter list and the meta data, plus 'is adult' checking.
|
||||
def extractChapterUrlsAndMetadata(self):
|
||||
|
||||
|
|
@ -129,7 +136,7 @@ class StoriesOnlineNetAdapter(BaseSiteAdapter):
|
|||
if self.needToLoginCheck(data):
|
||||
# need to log in for this one.
|
||||
self.performLogin(url)
|
||||
data = self._fetchUrl(url+":i")
|
||||
data = self._fetchUrl(url+":i",usecache=False)
|
||||
|
||||
if "Access denied. This story has not been validated by the adminstrators of this site." in data:
|
||||
raise exceptions.FailedToDownload(self.getSiteDomain() +" says: Access denied. This story has not been validated by the adminstrators of this site.")
|
||||
|
|
|
|||
Loading…
Reference in a new issue