mirror of
https://github.com/TeamPGM/PagerMaid_Plugins_Pyro.git
synced 2024-11-22 03:19:18 +00:00
xjj 修复 api
This commit is contained in:
parent
e3193b83ed
commit
09717d0c67
11
xjj/main.py
11
xjj/main.py
@ -2,6 +2,12 @@ from pagermaid.listener import listener
|
|||||||
from pagermaid.enums import Message, AsyncClient
|
from pagermaid.enums import Message, AsyncClient
|
||||||
|
|
||||||
|
|
||||||
|
async def get_video_url(client: AsyncClient) -> str:
|
||||||
|
res = await client.get("https://tucdn.wpon.cn/api-girl/index.php?wpon=json", timeout=10.0)
|
||||||
|
data = res.json()
|
||||||
|
return "https:" + data["mp4"]
|
||||||
|
|
||||||
|
|
||||||
@listener(command="xjj", description="小姐姐视频")
|
@listener(command="xjj", description="小姐姐视频")
|
||||||
async def xjj(message: Message, client: AsyncClient):
|
async def xjj(message: Message, client: AsyncClient):
|
||||||
if message.chat and message.chat.id == -1001441461877:
|
if message.chat and message.chat.id == -1001441461877:
|
||||||
@ -10,10 +16,7 @@ async def xjj(message: Message, client: AsyncClient):
|
|||||||
return
|
return
|
||||||
await message.edit("小姐姐视频生成中 . . .")
|
await message.edit("小姐姐视频生成中 . . .")
|
||||||
try:
|
try:
|
||||||
res = await client.get("https://cao3.ml/get/get1.php", timeout=10.0)
|
url = await get_video_url(client)
|
||||||
if res.status_code == 200:
|
|
||||||
url = res.text
|
|
||||||
url = url.split("?tag=")[0]
|
|
||||||
try:
|
try:
|
||||||
await message.reply_video(
|
await message.reply_video(
|
||||||
url,
|
url,
|
||||||
|
Loading…
Reference in New Issue
Block a user