From aacf6dc6a2127597a1aa11d7afdd6f2a6d068993 Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Thu, 12 Sep 2013 22:40:41 -0500 Subject: [PATCH] Switch portkey.org to non-stone soup and brute-force remove tags. --- fanficdownloader/adapters/adapter_portkeyorg.py | 6 ++++-- index.html | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/fanficdownloader/adapters/adapter_portkeyorg.py b/fanficdownloader/adapters/adapter_portkeyorg.py index de6cc687..1e0e2dd9 100644 --- a/fanficdownloader/adapters/adapter_portkeyorg.py +++ b/fanficdownloader/adapters/adapter_portkeyorg.py @@ -251,8 +251,10 @@ class PortkeyOrgAdapter(BaseSiteAdapter): # XXX logger.debug('Getting chapter text from: %s' % url) data = self._fetchUrl(url) - soup = bs.BeautifulStoneSoup(data, - selfClosingTags=('br','hr')) # otherwise soup eats the br/hr tags. + +# data = data.replace("HTML>","div>") + + soup = bs.BeautifulSoup(data) #print("soup:%s"%soup) tag = soup.find('td', {'class' : 'story'}) diff --git a/index.html b/index.html index 9e2c1deb..1116fe0f 100644 --- a/index.html +++ b/index.html @@ -78,7 +78,7 @@ If you have any problems with this application, please report them in the FanFictionDownLoader Google Group. The - Previous Version is also available for you to use if necessary. + Previous Version is also available for you to use if necessary.

{{ error_message }}