From 1fd6913dfbb91a2c867f6b8705d81df64096ef9a Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Fri, 11 Mar 2016 11:06:57 -0600 Subject: [PATCH] Allow a second kind of 'chapter missing' for portkey.org. --- fanficfare/adapters/adapter_portkeyorg.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fanficfare/adapters/adapter_portkeyorg.py b/fanficfare/adapters/adapter_portkeyorg.py index be05e12..28484a5 100644 --- a/fanficfare/adapters/adapter_portkeyorg.py +++ b/fanficfare/adapters/adapter_portkeyorg.py @@ -270,7 +270,10 @@ class PortkeyOrgAdapter(BaseSiteAdapter): # XXX tag = soup.find('td', {'class' : 'story'}) if tag == None and "
Chapter does not exist!
" in data: logger.error("Chapter is missing at: %s"%url) - return self.utf8FromSoup(url,self.make_soup("

Chapter does not exist!

Chapter is missing at: %s

"%(url,url))) + return self.utf8FromSoup(url,self.make_soup("

Site says: Chapter does not exist!

Chapter is missing at: %s

"%(url,url))) + elif tag == None and "
This chapter has corrupted or a blank chapter was uploaded. Please contact the author and request that they re-upload the chapter
" in data: + logger.error("Chapter is missing at: %s"%url) + return self.utf8FromSoup(url,self.make_soup("

Site says: This chapter has corrupted or a blank chapter was uploaded.

Chapter is missing at: %s

"%(url,url))) tag.name='div' # force to be a div to avoid problems with nook. centers = tag.findAll('center')