mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-06-08 04:43:00 +08:00
Merge branch 'main' of github.com:felinae98/nonebot-bison
This commit is contained in:
commit
d227a6f49e
@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
## 最近更新
|
## 最近更新
|
||||||
|
|
||||||
- 添加新的订阅平台mcbbsnews [@AzideCupric](https://github.com/AzideCupric) ([#84](https://github.com/felinae98/nonebot-bison/pull/84))
|
|
||||||
|
|
||||||
### 新功能
|
### 新功能
|
||||||
|
|
||||||
|
- 增加rss对media_content中图片的支持 [@felinae98](https://github.com/felinae98) ([#87](https://github.com/felinae98/nonebot-bison/pull/87))
|
||||||
|
- 添加新的订阅平台mcbbsnews [@AzideCupric](https://github.com/AzideCupric) ([#84](https://github.com/felinae98/nonebot-bison/pull/84))
|
||||||
- 添加bilibili开播提醒 [@Sichongzou](https://github.com/Sichongzou) ([#60](https://github.com/felinae98/nonebot-bison/pull/60))
|
- 添加bilibili开播提醒 [@Sichongzou](https://github.com/Sichongzou) ([#60](https://github.com/felinae98/nonebot-bison/pull/60))
|
||||||
- 添加User-Agent配置 [@felinae98](https://github.com/felinae98) ([#78](https://github.com/felinae98/nonebot-bison/pull/78))
|
- 添加User-Agent配置 [@felinae98](https://github.com/felinae98) ([#78](https://github.com/felinae98/nonebot-bison/pull/78))
|
||||||
- 增加代理设置 [@felinae98](https://github.com/felinae98) ([#71](https://github.com/felinae98/nonebot-bison/pull/71))
|
- 增加代理设置 [@felinae98](https://github.com/felinae98) ([#71](https://github.com/felinae98/nonebot-bison/pull/71))
|
||||||
|
@ -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