From 7f00c56ecfed8bad62d6ef4f5f7dd504b6d4dfeb Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Wed, 23 Sep 2015 22:25:59 -0500 Subject: [PATCH] Strip leading/trailing single or double quotes from chapter URLs. Author typo fix. --- fanficfare/adapters/base_xenforoforum_adapter.py | 1 + 1 file changed, 1 insertion(+) diff --git a/fanficfare/adapters/base_xenforoforum_adapter.py b/fanficfare/adapters/base_xenforoforum_adapter.py index 9d9a59b..f619274 100644 --- a/fanficfare/adapters/base_xenforoforum_adapter.py +++ b/fanficfare/adapters/base_xenforoforum_adapter.py @@ -166,6 +166,7 @@ class BaseXenForoForumAdapter(BaseSiteAdapter): url.startswith('https://'+self.getSiteDomain()) ) and ('/posts/' in url or '/threads/' in url): # brute force way to deal with SB's http->https change when hardcoded http urls. url = url.replace('http://'+self.getSiteDomain(),self.getURLPrefix()) + url = re.sub(r'(^[\'"]+|[\'"]+$)','',url) # strip leading or trailing '" from incorrect quoting. logger.debug("used chapurl:%s"%(url)) self.chapterUrls.append((name,url)) if url == useurl and 'First Post' == self.chapterUrls[0][0]: