mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-07-15 04:33:01 +08:00
strip text
This commit is contained in:
parent
c8f5adc96e
commit
145dcf870a
@ -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'])
|
||||
|
Loading…
x
Reference in New Issue
Block a user