Spaces:
Running
Running
import json | |
import os | |
import hashlib | |
import secrets | |
# 获取当前文件所在的目录 | |
current_dir = os.path.dirname(os.path.realpath(__file__)) | |
# 读取配置文件 | |
with open(os.path.join(current_dir, 'uu.json'), 'r') as f: | |
config = json.load(f) | |
headers = { | |
'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7', | |
'accept-language': 'zh-CN,zh;q=0.9', | |
'cache-control': 'max-age=0', | |
'priority': 'u=0, i', | |
'sec-ch-ua': '"Chromium";v="128", "Not;A=Brand";v="24", "Google Chrome";v="128"', | |
'sec-ch-ua-mobile': '?0', | |
'sec-ch-ua-platform': '"macOS"', | |
'sec-fetch-dest': 'document', | |
'sec-fetch-mode': 'navigate', | |
'sec-fetch-site': 'none', | |
'sec-fetch-user': '?1', | |
'upgrade-insecure-requests': '1', | |
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36' | |
} | |