mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-04-30 10:51:35 +02:00
adapter_asianfanficscom foreword json fix
This commit is contained in:
parent
e46942ccde
commit
54c0177b15
1 changed files with 2 additions and 2 deletions
|
|
@ -200,8 +200,8 @@ class AsianFanFicsComAdapter(BaseSiteAdapter):
|
|||
|
||||
# story description
|
||||
try:
|
||||
jsonlink = soup.find('link',href=re.compile(r'/api/forewords/[0-9]+/foreword_[0-9a-z]+.json'))
|
||||
fore_json = json.loads(self._fetchUrl(jsonlink['href']))
|
||||
jsonlink = soup.find('script',string=re.compile(r'/api/forewords/[0-9]+/foreword_[0-9a-z]+.json')).get_text().split('"')[1] # grabs url from quotation marks
|
||||
fore_json = json.loads(self._fetchUrl(jsonlink))
|
||||
content = self.make_soup(fore_json['post']).find('body') # BS4 adds <html><body> if not present.
|
||||
a = content.find('div', {'id':'story-description'})
|
||||
except:
|
||||
|
|
|
|||
Loading…
Reference in a new issue