From da4d7fc5bfcea132b44574c2736347ed1e48970b Mon Sep 17 00:00:00 2001 From: David Lynch Date: Sun, 6 Nov 2016 09:55:34 -0600 Subject: [PATCH] Trim xenforo titles --- sites/xenforo.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sites/xenforo.py b/sites/xenforo.py index a52c8ca..fb838ff 100644 --- a/sites/xenforo.py +++ b/sites/xenforo.py @@ -40,9 +40,10 @@ class XenForo(Site): href = mark.get('href') if not href.startswith('http'): href = base + href - print("Fetching chapter", mark.string, href) + title = str(mark.string).strip() + print("Fetching chapter", title, href) contents, post_date = self._chapter(href, idx) - chapters.append(Chapter(title=str(mark.string), contents=contents, date=post_date)) + chapters.append(Chapter(title=title, contents=contents, date=post_date)) story['chapters'] = chapters story['footnotes'] = '\n\n'.join(self.footnotes)