mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-06-07 20:33:01 +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")
|
soup = bs(raw_post.description, "html.parser")
|
||||||
text += soup.text.strip()
|
text += soup.text.strip()
|
||||||
pics = list(map(lambda x: x.attrs["src"], soup("img")))
|
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(
|
return Post(
|
||||||
"rss",
|
"rss",
|
||||||
text=text,
|
text=text,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user