From 2d8c13728d7a1ab66766a4165019c32b7ef77ddf Mon Sep 17 00:00:00 2001 From: Ida Date: Sun, 20 May 2012 10:57:39 -0400 Subject: [PATCH] Changed the way title is processed for sycophanthex.com --- fanficdownloader/adapters/adapter_ashwindersycophanthexcom.py | 2 +- fanficdownloader/adapters/adapter_chaossycophanthexcom.py | 2 +- fanficdownloader/adapters/adapter_erosnsapphosycophanthexcom.py | 2 +- fanficdownloader/adapters/adapter_lumossycophanthexcom.py | 2 +- fanficdownloader/adapters/adapter_occlumencysycophanthexcom.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fanficdownloader/adapters/adapter_ashwindersycophanthexcom.py b/fanficdownloader/adapters/adapter_ashwindersycophanthexcom.py index 31b71378..dc4ef003 100644 --- a/fanficdownloader/adapters/adapter_ashwindersycophanthexcom.py +++ b/fanficdownloader/adapters/adapter_ashwindersycophanthexcom.py @@ -160,7 +160,7 @@ class AshwinderSycophantHexComAdapter(BaseSiteAdapter): for info in asoup.findAll('table', {'bordercolor' : '#1A1919'}): a = info.find('a', href=re.compile(r'viewstory.php\?sid='+self.story.getMetadata('storyId')+"$")) if a != None: - self.story.setMetadata('title',a.string) + self.story.setMetadata('title',a.text) break diff --git a/fanficdownloader/adapters/adapter_chaossycophanthexcom.py b/fanficdownloader/adapters/adapter_chaossycophanthexcom.py index a9c81f2c..b6cf945b 100644 --- a/fanficdownloader/adapters/adapter_chaossycophanthexcom.py +++ b/fanficdownloader/adapters/adapter_chaossycophanthexcom.py @@ -119,7 +119,7 @@ class ChaosSycophantHexComAdapter(BaseSiteAdapter): ## Title pt = soup.find('div', {'id' : 'pagetitle'}) a = pt.find('a', href=re.compile(r'viewstory.php\?sid='+self.story.getMetadata('storyId')+"$")) - self.story.setMetadata('title',a.string) + self.story.setMetadata('title',a.text) # Find authorid and URL from... author url. a = pt.find('a', href=re.compile(r"viewuser.php\?uid=\d+")) diff --git a/fanficdownloader/adapters/adapter_erosnsapphosycophanthexcom.py b/fanficdownloader/adapters/adapter_erosnsapphosycophanthexcom.py index 3a0e72b0..1f5567c9 100644 --- a/fanficdownloader/adapters/adapter_erosnsapphosycophanthexcom.py +++ b/fanficdownloader/adapters/adapter_erosnsapphosycophanthexcom.py @@ -135,7 +135,7 @@ class ErosnSapphoSycophantHexComAdapter(BaseSiteAdapter): ## Title pt = soup.find('div', {'id' : 'pagetitle'}) a = pt.find('a', href=re.compile(r'viewstory.php\?sid='+self.story.getMetadata('storyId')+"$")) - self.story.setMetadata('title',a.string) + self.story.setMetadata('title',a.text) # Find authorid and URL from... author url. a = pt.find('a', href=re.compile(r"viewuser.php\?uid=\d+")) diff --git a/fanficdownloader/adapters/adapter_lumossycophanthexcom.py b/fanficdownloader/adapters/adapter_lumossycophanthexcom.py index cd43de0c..e011b2e9 100644 --- a/fanficdownloader/adapters/adapter_lumossycophanthexcom.py +++ b/fanficdownloader/adapters/adapter_lumossycophanthexcom.py @@ -119,7 +119,7 @@ class ChaosSycophantHexComAdapter(BaseSiteAdapter): ## Title pt = soup.find('div', {'id' : 'pagetitle'}) a = pt.find('a', href=re.compile(r'viewstory.php\?sid='+self.story.getMetadata('storyId')+"$")) - self.story.setMetadata('title',a.string) + self.story.setMetadata('title',a.text) # Find authorid and URL from... author url. a = pt.find('a', href=re.compile(r"viewuser.php\?uid=\d+")) diff --git a/fanficdownloader/adapters/adapter_occlumencysycophanthexcom.py b/fanficdownloader/adapters/adapter_occlumencysycophanthexcom.py index ce07e53b..c31a674c 100644 --- a/fanficdownloader/adapters/adapter_occlumencysycophanthexcom.py +++ b/fanficdownloader/adapters/adapter_occlumencysycophanthexcom.py @@ -161,7 +161,7 @@ class OcclumencySycophantHexComAdapter(BaseSiteAdapter): for info in asoup.findAll('table', {'class' : 'border'}): a = info.find('a', href=re.compile(r'viewstory.php\?sid='+self.story.getMetadata('storyId')+"$")) if a != None: - self.story.setMetadata('title',a.string) + self.story.setMetadata('title',a.text) break