🔐 Transfer to gitlab.

This commit is contained in:
xtaodada 2022-02-24 13:53:02 +08:00
parent 60681470e6
commit 721cb749fd
No known key found for this signature in database
GPG Key ID: 824635AFA2E35C65
4 changed files with 10 additions and 10 deletions

2
eat.py
View File

@ -22,7 +22,7 @@ import json
try:
git_source = config['git_source']
except:
git_source = "https://raw.githubusercontent.com/Xtao-Labs/PagerMaid_Plugins/master/"
git_source = "https://gitlab.com/Xtao-Labs/PagerMaid_Plugins/-/raw/master/"
positions = {
"1": [297, 288],
"2": [85, 368],

View File

@ -938,13 +938,13 @@ async def funcset(context):
func_name = cmd[1]
func_online = \
json.loads(
requests.get("https://raw.githubusercontent.com/xtaodada/PagerMaid_Plugins/master"
requests.get("https://gitlab.com/Xtao-Labs/PagerMaid_Plugins/-/raw/master"
"/keyword_func/list.json").content)["list"]
if func_name in func_online:
func_directory = f"data/keyword_func/"
file_path = func_name + ".py"
func_content = requests.get(
f"https://raw.githubusercontent.com/xtaodada/PagerMaid_Plugins/master"
f"https://gitlab.com/Xtao-Labs/PagerMaid_Plugins/-/raw/master"
f"/keyword_func/{func_name}.py").content
with open(file_path, "wb") as f:
f.write(func_content)

View File

@ -93,15 +93,15 @@ async def throwit(context):
reply_to = context.message.reply_to_msg_id
if exists("plugins/throwit/" + str(target_user.user.id) + ".jpg"):
if not exists('plugins/throwit/1.png'):
r = get('https://raw.githubusercontent.com/xtaodada/PagerMaid_Plugins/master/throwit/1.png')
r = get('https://gitlab.com/Xtao-Labs/PagerMaid_Plugins/-/raw/master/throwit/1.png')
with open("plugins/throwit/1.png", "wb") as code:
code.write(r.content)
if not exists('plugins/throwit/2.png'):
r = get('https://raw.githubusercontent.com/xtaodada/PagerMaid_Plugins/master/throwit/2.png')
r = get('https://gitlab.com/Xtao-Labs/PagerMaid_Plugins/-/raw/master/throwit/2.png')
with open("plugins/throwit/2.png", "wb") as code:
code.write(r.content)
if not exists('plugins/throwit/3.png'):
r = get('https://raw.githubusercontent.com/xtaodada/PagerMaid_Plugins/master/throwit/3.png')
r = get('https://gitlab.com/Xtao-Labs/PagerMaid_Plugins/-/raw/master/throwit/3.png')
with open("plugins/throwit/3.png", "wb") as code:
code.write(r.content)
# 随机数生成

View File

@ -160,20 +160,20 @@ async def yv_lu_(context):
# 下载资源文件
for num in range(1, 5):
if not exists('plugins/yvlu/p' + str(num) + '.png'):
re = get('https://raw.githubusercontent.com/Xtao-Labs/PagerMaid_Plugins/master/yvlu/p' + str(num) + '.png')
re = get('https://gitlab.com/Xtao-Labs/PagerMaid_Plugins/-/raw/master/yvlu/p' + str(num) + '.png')
with open('plugins/yvlu/p' + str(num) + '.png', 'wb') as bg:
bg.write(re.content)
if not exists('plugins/yvlu/mask.png'):
re = get('https://raw.githubusercontent.com/Xtao-Labs/PagerMaid_Plugins/master/yvlu/mask.png')
re = get('https://gitlab.com/Xtao-Labs/PagerMaid_Plugins/-/raw/master/yvlu/mask.png')
with open('plugins/yvlu/mask.png', 'wb') as bg:
bg.write(re.content)
if not exists('plugins/yvlu/mask1.png'):
re = get('https://raw.githubusercontent.com/Xtao-Labs/PagerMaid_Plugins/master/yvlu/mask1.png')
re = get('https://gitlab.com/Xtao-Labs/PagerMaid_Plugins/-/raw/master/yvlu/mask1.png')
with open('plugins/yvlu/mask1.png', 'wb') as bg:
bg.write(re.content)
if not exists('plugins/yvlu/ZhuZiAWan-2.ttc'):
await context.edit('下载字体中。。。')
re = get('https://raw.githubusercontent.com/Xtao-Labs/Telegram_PaimonBot/master/assets/fonts/ZhuZiAWan-2.ttc')
re = get('https://gitlab.com/Xtao-Labs/Telegram_PaimonBot/-/raw/master/assets/fonts/ZhuZiAWan-2.ttc')
with open('plugins/yvlu/ZhuZiAWan-2.ttc', 'wb') as bg:
bg.write(re.content)
# 获取回复信息