mirror of
https://github.com/TeamPGM/PagerMaid_Plugins.git
synced 2024-11-22 03:19:17 +00:00
🚩 acg cosplay meizi - 优化图源与API (#14)
This commit is contained in:
parent
5567412c9e
commit
caea11342c
21
acg-multi.py
21
acg-multi.py
@ -1,3 +1,4 @@
|
||||
import json
|
||||
from random import randint
|
||||
from time import sleep
|
||||
from requests import get
|
||||
@ -11,7 +12,7 @@ async def joke(context):
|
||||
await context.edit("获取中 . . .")
|
||||
status = False
|
||||
for _ in range (20): #最多重试20次
|
||||
website = randint(0, 3)
|
||||
website = randint(0, 9)
|
||||
if website == 0:
|
||||
img = get("http://api.btstu.cn/sjbz/?lx=m_dongman")
|
||||
elif website == 1:
|
||||
@ -20,7 +21,25 @@ async def joke(context):
|
||||
img = get("https://img.xjh.me/random_img.php?type=bg&ctype=acg&return=302&device=mobile")
|
||||
elif website == 3:
|
||||
img = get("https://www.yunboys.cn/sjbz/api.php?method=mobile&lx=dongman")
|
||||
elif website == 4:
|
||||
img = get("http://www.dmoe.cc/random.php")
|
||||
elif website == 5:
|
||||
img = get("https://api.vvhan.com/api/acgimg")
|
||||
elif website == 6:
|
||||
img = get("http://api.mtyqx.cn/api/random.php")
|
||||
elif website == 7:
|
||||
img = get("http://random.firefliestudio.com/")
|
||||
elif website == 8:
|
||||
img = get("https://api.mmcee.cn/acgimg/acgurl.php")
|
||||
elif website == 9:
|
||||
img = get('https://api.lolicon.app/setu/?r18=0')
|
||||
if img.status_code == 200:
|
||||
if website == 9:
|
||||
tmp = json.loads(img.content)
|
||||
img = tmp['data'][0]['url']
|
||||
img = get(img)
|
||||
if img.status_code != 200:
|
||||
continue #如果返回不正常就赶紧下一回
|
||||
with open(r'tu.png', 'wb') as f:
|
||||
await context.edit("正在上传图片")
|
||||
f.write(img.content)
|
||||
|
@ -11,7 +11,7 @@ async def joke(context):
|
||||
await context.edit("获取中 . . .")
|
||||
status = False
|
||||
for _ in range (20): #最多重试20次
|
||||
website = randint(0, 4)
|
||||
website = randint(0, 6)
|
||||
if website == 0:
|
||||
img = get("https://api.helloworld.la/xiezhen_cosplay.php")
|
||||
elif website == 1:
|
||||
@ -22,6 +22,10 @@ async def joke(context):
|
||||
img = get("http://api.rosysun.cn/cos")
|
||||
elif website == 4:
|
||||
img = get("https://uploadbeta.com/api/pictures/random/?key=%E5%8A%A8%E6%BC%AB")
|
||||
elif website == 5:
|
||||
img = get("https://uploadbeta.com/api/pictures/random/?key=%E4%BA%8C%E6%AC%A1%E5%85%83")
|
||||
elif website == 6:
|
||||
img = get("https://xn--wcs142h.herokuapp.com/")
|
||||
if img.status_code == 200:
|
||||
if website == 3:
|
||||
img = get(img.content)
|
||||
|
14
list.json
14
list.json
@ -152,7 +152,7 @@
|
||||
},
|
||||
{
|
||||
"name": "portball",
|
||||
"version": "1.21",
|
||||
"version": "1.2",
|
||||
"section": "chat",
|
||||
"maintainer": "Pentacene",
|
||||
"size": "3.6 kb",
|
||||
@ -212,30 +212,30 @@
|
||||
},
|
||||
{
|
||||
"name": "cosplay-multi",
|
||||
"version": "1.0",
|
||||
"version": "1.1",
|
||||
"section": "profile",
|
||||
"maintainer": "TNTcraftHIM",
|
||||
"size": "1.8 kb",
|
||||
"size": "2.0 kb",
|
||||
"supported": true,
|
||||
"des-short": "多网站随机获取Cos图",
|
||||
"des": "在不同的几个网站中随机获取Cosplay图片,解决了cosplay单个API流量用尽后无法获取的问题。命令:cosm。"
|
||||
},
|
||||
{
|
||||
"name": "meizi",
|
||||
"version": "1.0",
|
||||
"version": "1.1",
|
||||
"section": "profile",
|
||||
"maintainer": "TNTcraftHIM",
|
||||
"size": "2.0 kb",
|
||||
"size": "2.6 kb",
|
||||
"supported": true,
|
||||
"des-short": "多网站随机获取写真",
|
||||
"des": "从不同的网站中调取妹子写真,但是无漏点,放心使用(安全版ghs)。命令:meizi。"
|
||||
},
|
||||
{
|
||||
"name": "acg-multi",
|
||||
"version": "1.0",
|
||||
"version": "1.1",
|
||||
"section": "profile",
|
||||
"maintainer": "TNTcraftHIM",
|
||||
"size": "1.4 kb",
|
||||
"size": "2.4 kb",
|
||||
"supported": true,
|
||||
"des-short": "多网站随机获取ACG图",
|
||||
"des": "从几个不同的图库中随机获取二刺螈(bushi)ACG图片,基本都是手机尺寸的图。命令:acgm。"
|
||||
|
22
meizi.py
22
meizi.py
@ -7,19 +7,19 @@ from os import remove
|
||||
|
||||
@listener(is_plugin=True, outgoing=True, command="meizi",
|
||||
description="多网站随机获取性感(可能)的写真")
|
||||
async def joke(context):
|
||||
async def meizi(context):
|
||||
await context.edit("获取中 . . .")
|
||||
status = False
|
||||
for _ in range (20): #最多重试20次
|
||||
website = randint(0, 7)
|
||||
website = randint(0, 13)
|
||||
if website == 0:
|
||||
img = get("https://mm.52.mk")
|
||||
elif website == 1:
|
||||
img = get("https://api.helloworld.la/xiezhen_xinggan.php")
|
||||
elif website == 2:
|
||||
img = get("https://api.helloworld.la/bizhi_meizi.php")
|
||||
img = get("https://api.qicaiyun.top/sjbz/api.php?lx=meizi")
|
||||
elif website == 3:
|
||||
img = get("https://uploadbeta.com/api/pictures/random/?key=%E5%A4%A7%E5%B0%BA%E5%BA%A6")
|
||||
img = get("http://api.btstu.cn/sjbz/?lx=meizi")
|
||||
elif website == 4:
|
||||
img = get("https://cdn.seovx.com/?mom=302")
|
||||
elif website == 5:
|
||||
@ -27,7 +27,19 @@ async def joke(context):
|
||||
elif website == 6:
|
||||
img = get("https://uploadbeta.com/api/pictures/random/?key=%E6%8E%A8%E5%A5%B3%E9%83%8E")
|
||||
elif website == 7:
|
||||
img = get("https://uploadbeta.com/api/pictures/random/?key=%E5%A5%B3%E7%A5%9E")
|
||||
img = get("https://uploadbeta.com/api/pictures/random/?key=%E7%BE%8E%E5%A5%B3")
|
||||
elif website == 8:
|
||||
img = get("https://api.941ka.cn/api/mnxz")
|
||||
elif website == 9:
|
||||
img = get("https://api.lyiqk.cn/sexylady")
|
||||
elif website == 10:
|
||||
img = get("https://api.pingping6.com/tools/acg3/index.php")
|
||||
elif website == 11:
|
||||
img = get("https://api.pingping6.com/tools/acg3")
|
||||
elif website == 12:
|
||||
img = get("https://api.diskgirl.com/image/api.php?t=&v=0.9451485087333713")
|
||||
elif website == 13:
|
||||
img = get("https://api.diskgirl.com/image/api.php?t=&v=" + str(random.uniform(0, 100)))
|
||||
if img.status_code == 200:
|
||||
with open(r'tu.png', 'wb') as f:
|
||||
await context.edit("正在上传图片")
|
||||
|
Loading…
Reference in New Issue
Block a user