From a589cf4280dc67179d6309f98cc2b73be86e0dc5 Mon Sep 17 00:00:00 2001 From: cryzed Date: Sun, 8 Jun 2014 18:32:09 +0200 Subject: [PATCH] Removed debug print statement and fixed a potential bug --- fanficdownloader/adapters/adapter_nocturnallightnet.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fanficdownloader/adapters/adapter_nocturnallightnet.py b/fanficdownloader/adapters/adapter_nocturnallightnet.py index fceb6f7..7722f4e 100644 --- a/fanficdownloader/adapters/adapter_nocturnallightnet.py +++ b/fanficdownloader/adapters/adapter_nocturnallightnet.py @@ -83,7 +83,7 @@ class NocturnalLightNetAdapter(BaseSiteAdapter): self.story.setMetadata('authorId', author_id) self.story.setMetadata('authorUrl', self.AUTHORS_URL_TEMPLATE % author_id) - chapter_anchors = soup('a', href=lambda href: href.startswith('/fanfiction/story/')) + chapter_anchors = soup('a', href=lambda href: href and href.startswith('/fanfiction/story/')) for chapter_anchor in chapter_anchors: url = urlparse.urljoin(self.BASE_URL, chapter_anchor['href']) self.chapterUrls.append((chapter_anchor.string, url)) @@ -108,7 +108,6 @@ class NocturnalLightNetAdapter(BaseSiteAdapter): for b_tag in listbox('b'): key = b_tag.string.strip(':') - print repr(key) try: value = b_tag.nextSibling.string.replace('•', '').strip(': ') # This can happen with some fancy markup in the summary. Just