From c06028b49871c1eade6cb1f15a7a38c315323c41 Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Sat, 10 May 2014 14:30:06 -0500 Subject: [PATCH] Fix for AO3 story not found. --- fanficdownloader/adapters/adapter_archiveofourownorg.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fanficdownloader/adapters/adapter_archiveofourownorg.py b/fanficdownloader/adapters/adapter_archiveofourownorg.py index 2eda30d5..f377cba4 100644 --- a/fanficdownloader/adapters/adapter_archiveofourownorg.py +++ b/fanficdownloader/adapters/adapter_archiveofourownorg.py @@ -145,10 +145,13 @@ class ArchiveOfOurOwnOrgAdapter(BaseSiteAdapter): except urllib2.HTTPError, e: if e.code == 404: - raise exceptions.StoryDoesNotExist(self.meta) + raise exceptions.StoryDoesNotExist(self.url) else: raise e - + + if "Sorry, we couldn't find the work you were looking for." in data: + raise exceptions.StoryDoesNotExist(self.url) + if self.needToLoginCheck(data): # need to log in for this one. self.performLogin(url,data)