From 83c8987b8ba9a42c77366cea2c06693f2f0a61fd Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Sat, 20 Feb 2016 10:42:06 -0600 Subject: [PATCH] Fix for adapter_thehexfilesnet missing chapter text. --- fanficfare/adapters/adapter_thehexfilesnet.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/fanficfare/adapters/adapter_thehexfilesnet.py b/fanficfare/adapters/adapter_thehexfilesnet.py index d435000..10e83c4 100644 --- a/fanficfare/adapters/adapter_thehexfilesnet.py +++ b/fanficfare/adapters/adapter_thehexfilesnet.py @@ -193,14 +193,10 @@ class TheHexFilesNetAdapter(BaseSiteAdapter): if None == soup: raise exceptions.FailedToDownload("Error downloading Chapter: %s! Missing required element!" % url) - # Ugh. chapter html doesn't haven't anything useful around it to demarcate. - for a in soup.findAll('table'): + content = soup.find('table',{'class':'table'}).find('td') # td inside + content.name='div' + + for a in content.findAll('table'): a.extract() - for a in soup.findAll('head'): - a.extract() - - html = soup.find('html') - html.name='div' - - return self.utf8FromSoup(url,soup) + return self.utf8FromSoup(url,content)