将api加入到插拔式配置

This commit is contained in:
Jing Ling
2020-08-14 13:00:39 +08:00
parent 091167acb2
commit e16b7dada0
23 changed files with 135 additions and 57 deletions
+3 -3
View File
@@ -8,7 +8,7 @@ github自动接管
import json
import base64
import requests
from config import api
from config import settings
HEADERS = {
"Accept": "application/json, text/javascript, */*; q=0.01",
@@ -21,8 +21,8 @@ def github_takeover(url):
# 读取config配置文件
repo_name = url
print('[*]正在读取配置文件')
user = api.github_api_user
token = api.github_api_token
user = settings.github_api_user
token = settings.github_api_token
headers = {
"Authorization": 'token ' + token,
"Accept": "application/vnd.github.switcheroo-preview+json"