1
0
Fork 0
mirror of https://github.com/kemayo/leech synced 2025-12-06 16:33:16 +01:00

Trim xenforo titles

This commit is contained in:
David Lynch 2016-11-06 09:55:34 -06:00
parent b5740691cc
commit da4d7fc5bf

View file

@ -40,9 +40,10 @@ class XenForo(Site):
href = mark.get('href') href = mark.get('href')
if not href.startswith('http'): if not href.startswith('http'):
href = base + href 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) 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['chapters'] = chapters
story['footnotes'] = '\n\n'.join(self.footnotes) story['footnotes'] = '\n\n'.join(self.footnotes)