优化API

This commit is contained in:
TNTcraftHIM 2020-08-25 01:20:08 +08:00
parent 1cd8e056f4
commit 0e40bf5e83
2 changed files with 3 additions and 7 deletions

View File

@ -225,7 +225,7 @@
"version": "1.3", "version": "1.3",
"section": "profile", "section": "profile",
"maintainer": "TNTcraftHIM", "maintainer": "TNTcraftHIM",
"size": "2.9 kb", "size": "2.6 kb",
"supported": true, "supported": true,
"des-short": "多网站随机获取写真", "des-short": "多网站随机获取写真",
"des": "从不同的网站中调取妹子写真但是无漏点放心使用安全版ghs。命令meizi。" "des": "从不同的网站中调取妹子写真但是无漏点放心使用安全版ghs。命令meizi。"

View File

@ -13,18 +13,14 @@ async def meizi(context):
for _ in range (20): #最多重试20次 for _ in range (20): #最多重试20次
website = random.randint(0, 13) website = random.randint(0, 13)
if website == 0: if website == 0:
continue img = get("https://mm.52.mk/img")
# img = get("https://mm.52.mk") 暂时停用
elif website == 1: elif website == 1:
img = get("https://api.helloworld.la/xiezhen_xinggan.php") img = get("https://api.helloworld.la/xiezhen_xinggan.php")
elif website == 2: elif website == 2:
# img = get("https://cdn.seovx.com/?mom=302") 不够涩
img = get("https://api.66mz8.com/api/rand.tbimg.php") img = get("https://api.66mz8.com/api/rand.tbimg.php")
elif website == 3: elif website == 3:
# img = get("http://api.btstu.cn/sjbz/?lx=meizi") 不够涩
img = get("https://api.isoyu.com/mm_images.php") img = get("https://api.isoyu.com/mm_images.php")
elif website == 4: elif website == 4:
# img = get("https://api.qicaiyun.top/sjbz/api.php?lx=meizi") 不够涩
img = get("https://uploadbeta.com/api/pictures/random/?key=%E5%A5%B3") img = get("https://uploadbeta.com/api/pictures/random/?key=%E5%A5%B3")
elif website == 5: elif website == 5:
img = get("https://uploadbeta.com/api/pictures/random/?key=%E5%A6%B9%E5%AD%90") img = get("https://uploadbeta.com/api/pictures/random/?key=%E5%A6%B9%E5%AD%90")
@ -43,7 +39,7 @@ async def meizi(context):
elif website == 12: elif website == 12:
img = get("https://api.diskgirl.com/image/api.php?t=&v=0.9451485087333713") img = get("https://api.diskgirl.com/image/api.php?t=&v=0.9451485087333713")
elif website == 13: elif website == 13:
img = get("https://api.diskgirl.com/image/api.php?t=&v=" + str(random.uniform(0, 100))) img = get("https://uploadbeta.com/api/pictures/random/?key=%E6%80%A7%E6%84%9F")
if img.status_code == 200: if img.status_code == 200:
with open(r'tu.png', 'wb') as f: with open(r'tu.png', 'wb') as f:
await context.edit("正在上传图片") await context.edit("正在上传图片")