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

Xenforo: clean out title prefixes

This commit is contained in:
David Lynch 2019-06-17 16:13:09 -05:00
parent c8f5b3f8d8
commit b1b51bdc8f

View file

@ -65,8 +65,12 @@ class XenForo(Site):
base = soup.head.base.get('href') base = soup.head.base.get('href')
title = soup.select('div.titleBar > h1')[0]
# clean out informational bits from the title
for tag in title.find_all(class_='prefix'):
tag.decompose()
story = Section( story = Section(
title=soup.select('div.titleBar > h1')[0].get_text(), title=title.get_text().strip(),
author=soup.find('p', id='pageDescription').find('a', class_='username').get_text(), author=soup.find('p', id='pageDescription').find('a', class_='username').get_text(),
url=url url=url
) )