mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-06-05 19:36:43 +08:00
fix #86
This commit is contained in:
parent
9c1f29aaad
commit
4ec81468b7
@ -48,6 +48,10 @@ class Rss(NewMessage):
|
||||
soup = bs(raw_post.description, "html.parser")
|
||||
text += soup.text.strip()
|
||||
pics = list(map(lambda x: x.attrs["src"], soup("img")))
|
||||
if raw_post.get("media_content"):
|
||||
for media in raw_post["media_content"]:
|
||||
if media.get("medium") == "image" and media.get("url"):
|
||||
pics.append(media.get("url"))
|
||||
return Post(
|
||||
"rss",
|
||||
text=text,
|
||||
|
Loading…
x
Reference in New Issue
Block a user