mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 14:22:55 +08:00
commit
4d133ed2df
@ -55,7 +55,7 @@ async def _(event: GroupMessageEvent):
|
|||||||
data = None
|
data = None
|
||||||
if data:
|
if data:
|
||||||
# 转发视频
|
# 转发视频
|
||||||
if data.get("desc") == "哔哩哔哩":
|
if data.get("desc") == "哔哩哔哩" or data.get('prompt').find('哔哩哔哩') != -1:
|
||||||
async with aiohttp.ClientSession(
|
async with aiohttp.ClientSession(
|
||||||
headers=get_user_agent()
|
headers=get_user_agent()
|
||||||
) as session:
|
) as session:
|
||||||
@ -64,6 +64,8 @@ async def _(event: GroupMessageEvent):
|
|||||||
timeout=7,
|
timeout=7,
|
||||||
) as response:
|
) as response:
|
||||||
url = str(response.url).split("?")[0]
|
url = str(response.url).split("?")[0]
|
||||||
|
if url[-1] == '/':
|
||||||
|
url = url[:-1]
|
||||||
bvid = url.split("/")[-1]
|
bvid = url.split("/")[-1]
|
||||||
vd_info = await video.get_video_base_info(bvid)
|
vd_info = await video.get_video_base_info(bvid)
|
||||||
# 转发专栏
|
# 转发专栏
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user