feat 增加GITHUB_TOKEN,提高API限流阈值
This commit is contained in:
@ -87,7 +87,12 @@ class SystemChain(ChainBase, metaclass=Singleton):
|
||||
"""
|
||||
获取最新版本
|
||||
"""
|
||||
version_res = RequestUtils(proxies=settings.PROXY).get_res(
|
||||
headers = {}
|
||||
if settings.GITHUB_TOKEN:
|
||||
headers = {
|
||||
"Authorization": f"Bearer {settings.GITHUB_TOKEN}"
|
||||
}
|
||||
version_res = RequestUtils(proxies=settings.PROXY, headers=headers).get_res(
|
||||
"https://api.github.com/repos/jxxghp/MoviePilot/releases/latest")
|
||||
if version_res:
|
||||
ver_json = version_res.json()
|
||||
|
Reference in New Issue
Block a user