feat: 为GitHub API的访问使用代理 (#312)

This commit is contained in:
Rock Chin
2023-03-20 13:40:23 +00:00
parent 1964fc76c8
commit d2a7a57245
4 changed files with 20 additions and 3 deletions
+3
View File
@@ -3,10 +3,13 @@ import os
import requests
import pkg.utils.network as network
def read_latest() -> str:
resp = requests.get(
url="https://api.github.com/repos/RockChinQ/QChatGPT/contents/res/announcement",
proxies=network.wrapper_proxies()
)
obj_json = resp.json()
b64_content = obj_json["content"]