From bdaea798753078fa85a5999358c4a2fc4cd13a28 Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Mon, 2 May 2011 13:12:16 -0500 Subject: [PATCH] Previous change to elim newlines in debug sometimes output breaks download. Cheap fix, comment out debugs. --- fanficdownloader/adapter.py | 2 +- fanficdownloader/ffnet.py | 2 +- fanficdownloader/fictionalley.py | 4 ++-- fanficdownloader/ficwad.py | 2 +- fanficdownloader/fpcom.py | 2 +- fanficdownloader/hpfiction.py | 2 +- fanficdownloader/mediaminer.py | 2 +- fanficdownloader/twilighted.py | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/fanficdownloader/adapter.py b/fanficdownloader/adapter.py index cd029e94..48e8facd 100644 --- a/fanficdownloader/adapter.py +++ b/fanficdownloader/adapter.py @@ -143,7 +143,7 @@ class FanfictionSiteAdapter: def getStoryDescription(self): ## with out stripping \n's, appengine treats additional lines from this debug ## output as error messages. - logging.debug('self.storyDescription=%s' % self.storyDescription.replace("\n"," ").replace('\r','')) + #logging.debug('self.storyDescription=%s' % self.storyDescription.replace("\n"," ").replace('\r','')) return self.storyDescription def getStoryCreated(self): diff --git a/fanficdownloader/ffnet.py b/fanficdownloader/ffnet.py index f497705a..4c43cf36 100644 --- a/fanficdownloader/ffnet.py +++ b/fanficdownloader/ffnet.py @@ -257,7 +257,7 @@ class FFNet(FanfictionSiteAdapter): self.storyDescription = self.storyDescription + '&' + ss else: self.storyDescription = ss - logging.debug('self.storyDescription=%s' % self.storyDescription.replace('\n',' ').replace('\r','')) + #logging.debug('self.storyDescription=%s' % self.storyDescription.replace('\n',' ').replace('\r','')) elif l.find("var datep") != -1: dateps = self._getVarValue (l) self.storyPublished = datetime.datetime(*time.strptime ( dateps, "'%m-%d-%y'" )[0:5]) diff --git a/fanficdownloader/fictionalley.py b/fanficdownloader/fictionalley.py index 08eedaaa..889674d9 100644 --- a/fanficdownloader/fictionalley.py +++ b/fanficdownloader/fictionalley.py @@ -120,7 +120,7 @@ class FictionAlley(FanfictionSiteAdapter): logging.debug('self.storyCharacters=%s' % self.storyCharacters) elif keystr == 'Summary:': self.storyDescription = valstr - logging.debug('self.storyDescription=%s' % self.storyDescription.replace("\n"," ").replace('\r','')) + #logging.debug('self.storyDescription=%s' % self.storyDescription.replace("\n"," ").replace('\r','')) def extractIndividualUrls(self): @@ -208,7 +208,7 @@ class FictionAlley(FanfictionSiteAdapter): self.storyRating = ss1[1] logging.debug('self.storyRating=%s' % self.storyRating) self.storyDescription = unicode(ss[1]).replace("
","").replace("
","").replace('\n','') - logging.debug('self.storyDescription=%s' % self.storyDescription.replace("\n"," ").replace('\r','')) + #logging.debug('self.storyDescription=%s' % self.storyDescription.replace("\n"," ").replace('\r','')) for li in links: a = li.find('a', {'class' : 'chapterlink'}) diff --git a/fanficdownloader/ficwad.py b/fanficdownloader/ficwad.py index 68c1344d..f715f3b1 100644 --- a/fanficdownloader/ficwad.py +++ b/fanficdownloader/ficwad.py @@ -107,7 +107,7 @@ class FicWad(FanfictionSiteAdapter): description = soup.find('blockquote', {'class' : 'summary'}) if description is not None: self.storyDescription = unicode(description.p.string) - logging.debug('self.storyDescription=%s' % self.storyDescription.replace('\n',' ').replace('\r','')) + #logging.debug('self.storyDescription=%s' % self.storyDescription.replace('\n',' ').replace('\r','')) meta = soup.find('p', {'class' : 'meta'}) if meta is not None: diff --git a/fanficdownloader/fpcom.py b/fanficdownloader/fpcom.py index bf020c0b..ab2a9bca 100644 --- a/fanficdownloader/fpcom.py +++ b/fanficdownloader/fpcom.py @@ -155,7 +155,7 @@ class FPCom(FanfictionSiteAdapter): for meta in metas: if 'content' in meta._getAttrMap(): self.storyDescription = unicode(meta['content']) - logging.debug('self.storyDescription=%s' % self.storyDescription.replace("\n"," ").replace('\r','')) + #logging.debug('self.storyDescription=%s' % self.storyDescription.replace("\n"," ").replace('\r','')) title=meta.find('title') logging.debug('title=%s' % title.string) diff --git a/fanficdownloader/hpfiction.py b/fanficdownloader/hpfiction.py index ba265e12..0fb03df5 100644 --- a/fanficdownloader/hpfiction.py +++ b/fanficdownloader/hpfiction.py @@ -208,7 +208,7 @@ class HPFiction(FanfictionSiteAdapter): else: ii = ii + 1 self.storyDescription = sss - logging.debug('self.storyDescription=%s' % self.storyDescription.replace("\n"," ").replace('\r','')) + #logging.debug('self.storyDescription=%s' % self.storyDescription.replace("\n"," ").replace('\r','')) urls = [] diff --git a/fanficdownloader/mediaminer.py b/fanficdownloader/mediaminer.py index 81911042..03e64619 100644 --- a/fanficdownloader/mediaminer.py +++ b/fanficdownloader/mediaminer.py @@ -216,7 +216,7 @@ class MediaMiner(FanfictionSiteAdapter): pass elif ssbt == 'Summary:': self.storyDescription = sst.strip() - logging.debug('self.storyDescription=%s' % self.storyDescription.replace("\n"," ").replace('\r','')) + #logging.debug('self.storyDescription=%s' % self.storyDescription.replace("\n"," ").replace('\r','')) elif ssbt == 'Latest Revision:' or ssbt == 'Uploaded On:': #logging.debug('sst=%s' % sst) ssts = sst.split(' ') diff --git a/fanficdownloader/twilighted.py b/fanficdownloader/twilighted.py index 6517ab14..d1151e6c 100644 --- a/fanficdownloader/twilighted.py +++ b/fanficdownloader/twilighted.py @@ -176,7 +176,7 @@ class Twilighted(FanfictionSiteAdapter): ps = s1.findAll('p') if len(ps) > 0: self.storyDescription = ps[0] - logging.debug('self.storyDescription=%s' % self.storyDescription.replace("\n"," ").replace('\r','')) + #logging.debug('self.storyDescription=%s' % self.storyDescription.replace("\n"," ").replace('\r','')) else: divs = meta.findAll('div') #logging.debug('Divs: %s' % divs)