From 2d83fa8f5d23368b12b896368ed926db1b10d17f Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Thu, 30 Jun 2016 10:38:13 -0500 Subject: [PATCH] Fix for SIYE when author puts story URL in bio. --- fanficfare/adapters/adapter_siyecouk.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fanficfare/adapters/adapter_siyecouk.py b/fanficfare/adapters/adapter_siyecouk.py index 2d04085e..bc4d6d0c 100644 --- a/fanficfare/adapters/adapter_siyecouk.py +++ b/fanficfare/adapters/adapter_siyecouk.py @@ -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))