Skip to content
This repository was archived by the owner on Feb 14, 2023. It is now read-only.

Commit 42ffb2f

Browse files
author
RyoLee
committed
Merge branch 'PY-MR' of https://github.com/RyoLee/Gevjon-Observer into PY-MR
2 parents 56936fc + 1d22383 commit 42ffb2f

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

.github/workflows/PY_MR_DEPLOY.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ jobs:
7070
uses: softprops/action-gh-release@v1
7171
with:
7272
body: ${{ env.DEFAULT_CONTENT }}
73+
target_commitish: PY-MR
7374
generate_release_notes: true
7475
tag_name: ${{ env.TAG_NAME }}
7576
files: public/Gevjon-Observer.7z

Gevjon-Observer.pyw

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22

33
from threading import Thread
4-
from urllib.request import urlopen
4+
from urllib.request import urlopen,Request
55
import pymem
66
import time
77
import json
@@ -304,7 +304,9 @@ def check_update():
304304
retry = 0
305305
while MAX_RETRY > retry:
306306
try:
307-
tar_version = urlopen(VERSION_URL).read().decode("utf-8")
307+
headers = {'User-Agent':'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:23.0) Gecko/20100101 Firefox/23.0'}
308+
req = Request(url=VERSION_URL, headers=headers)
309+
tar_version = urlopen(req).read().decode("utf-8")
308310
# fmt: off
309311
logger.info("checking version...current[" + cur_version + "]->latest[" + tar_version + "]")
310312
# fmt: on
@@ -315,8 +317,9 @@ def check_update():
315317
"New version found",
316318
0x04 | 0x40,
317319
):
318-
urlopen(USER_COUNT_URL).decode("utf-8")
319320
webbrowser.open_new_tab(PRO_URL)
321+
req = Request(url=USER_COUNT_URL, headers=headers)
322+
urlopen(req).read()
320323
exit(0)
321324
else:
322325
return

version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.3.0
1+
1.3.1

0 commit comments

Comments
 (0)