mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-05-05 19:11:50 +02:00
adapter_asianfanficscom: Fix for 'friend only' stories initially giving 404
This commit is contained in:
parent
18b183585a
commit
22534986d3
1 changed files with 10 additions and 4 deletions
|
|
@ -111,11 +111,17 @@ class AsianFanFicsComAdapter(BaseSiteAdapter):
|
|||
def doExtractChapterUrlsAndMetadata(self,get_cover=True):
|
||||
url = self.url
|
||||
logger.info("url: "+url)
|
||||
data = self.get_request(url)
|
||||
soup = None
|
||||
try:
|
||||
data = self.get_request(url)
|
||||
soup = self.make_soup(data)
|
||||
except exceptions.HTTPErrorFFF as e:
|
||||
if e.status_code != 404:
|
||||
raise
|
||||
data = self.decode_data(e.data)
|
||||
|
||||
soup = self.make_soup(data)
|
||||
|
||||
if self.loginNeededCheck(data):
|
||||
# logger.debug(data)
|
||||
if not soup or self.loginNeededCheck(data):
|
||||
# always login if not already to avoid lots of headaches
|
||||
self.performLogin(url,data)
|
||||
# refresh website after logging in
|
||||
|
|
|
|||
Loading…
Reference in a new issue