strip text

This commit is contained in:
felinae98 2021-06-30 09:17:10 +08:00
parent c8f5adc96e
commit 145dcf870a
No known key found for this signature in database
GPG Key ID: 00C8B010587FF610

View File

@ -44,6 +44,6 @@ class Rss(NewMessage, TargetMixin):
async def parse(self, raw_post: RawPost) -> Post:
soup = bs(raw_post.description, 'html.parser')
text = soup.text
text = soup.text.strip()
pics = list(map(lambda x: x.attrs['src'], soup('img')))
return Post('rss', text=text, url=raw_post.link, pics=pics, target_name=raw_post['_target_name'])