Fix base_xenforoforum_adapter for redirected URLs with #fragments--happens if thread title changed.

This commit is contained in:
Jim Miller
2015-07-17 12:15:33 -05:00
parent fe8e5a641c
commit 5849f7cbbf
@@ -204,8 +204,11 @@ class BaseXenForoForumAdapter(BaseSiteAdapter):
def getChapterText(self, url):
logger.debug('Getting chapter text from: %s' % url)
origurl = url
(data,opened) = self._fetchUrlOpened(url)
url = opened.geturl()
if '#' in origurl and '#' not in url:
url = url + origurl[origurl.index('#'):]
logger.debug("chapter URL redirected to: %s"%url)
soup = self.make_soup(data)