mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-05-08 12:36:11 +02:00
Better auth page parsing due to own-favorite story in adapter_harrypotterfanfictioncom.
This commit is contained in:
parent
7a5730c720
commit
a2f1817f30
1 changed files with 5 additions and 3 deletions
|
|
@ -118,9 +118,11 @@ class HarryPotterFanFictionComSiteAdapter(BaseSiteAdapter):
|
|||
# fetch author page to get story description.
|
||||
authorsoup = self.make_soup(self._fetchUrl(self.story.getMetadata('authorUrl')))
|
||||
|
||||
# assumes don't need to worry about story URLs in descs.
|
||||
storya = authorsoup.find('a', href=re.compile(r"^/viewstory.php\?psid="+self.story.getMetadata('storyId')))
|
||||
storydiv = storya.find_parent('div')
|
||||
for story in authorsoup.find_all('article',class_='story-summary'):
|
||||
storya = story.find('h3').find('a',href=re.compile(r"^/viewstory.php\?psid="+self.story.getMetadata('storyId')))
|
||||
if storya:
|
||||
storydiv = storya.find_parent('div')
|
||||
break
|
||||
|
||||
# desc is escaped html in attr on iframe.
|
||||
iframe = storydiv.find('iframe')
|
||||
|
|
|
|||
Loading…
Reference in a new issue