Make adapter_storiesonlinenet.py use page cache.

This commit is contained in:
Jim Miller 2014-11-15 11:05:23 -06:00
parent 12ce63d5c9
commit 68381bc30b

View file

@ -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.")