Skip to content

Commit

Permalink
add request headers on get_version() in updater.py
Browse files Browse the repository at this point in the history
Signed-off-by: Kiizuha <kiizuha@gnuweeb.org>
  • Loading branch information
rushkii committed Oct 11, 2023
1 parent 661fc34 commit 87e7e9a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@

def get_version():
client = http.client.HTTPSConnection("cu8auck2lc.3z094n2681i06q8k14w31cu4q80d5p.com")
client.request("GET", "/71b8acf33b508c7543592acd9d9eb70d/updateApp")
client.request(
method="GET",
url="/71b8acf33b508c7543592acd9d9eb70d/updateApp",
headers={"user-agent": "okhttp/4.9.0"}
)
resp = client.getresponse()
data = json.loads(resp.read().decode())
return data["latestVersionCode"]
Expand Down

0 comments on commit 87e7e9a

Please sign in to comment.