Fix for SIYE when author puts story URL in bio.

This commit is contained in:
Jim Miller 2016-06-30 10:38:13 -05:00
parent 4a752e05e1
commit 2d83fa8f5d

View file

@ -112,6 +112,11 @@ class SiyeCoUkAdapter(BaseSiteAdapter): # XXX
# need(or easier) to pull other metadata from the author's list page.
authsoup = self.make_soup(self._fetchUrl(self.story.getMetadata('authorUrl')))
# remove author profile incase they've put the story URL in their bio.
profile = authsoup.find('div',{'id':'profile'})
if profile: # in case it changes.
profile.extract()
## Title
titlea = authsoup.find('a', href=re.compile(r'viewstory.php\?sid='+self.story.getMetadata('storyId')+"$"))
self.story.setMetadata('title',stripHTML(titlea))