Skip to content

Commit

Permalink
错误修复
Browse files Browse the repository at this point in the history
  • Loading branch information
SeaHOH committed Dec 15, 2022
1 parent 086423f commit a2d6135
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ addons:
script:
- export PYTHON_VERSION=3.11.1
- export PYTHON_IMPL_VERSION=cp311
- export RELEASE_VERSION=$(grep -oP '[0-9\.ab]+' local/__init__.py)
- export RELEASE_VERSION=$(grep -oP '[\d\.]+([abc]|post|dev)?\d*' local/__init__.py)

before_deploy:
- python launcher/updatecas.py -u -d --all
Expand Down
4 changes: 2 additions & 2 deletions local/CFWFetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def __init__(self, cfw_params):
self.headers = {
'Host': cfw_params.host,
'User-Agent': 'GotoX/ls/0.7',
'Accept-Encoding': 'br',
'Accept-Encoding': 'br' in decompress_readers and 'br' or 'gzip',
}

def __getattr__(self, name):
Expand Down Expand Up @@ -90,7 +90,7 @@ def fetch_server_version():
if response.status != 200:
logging.warning('CFW [%s] 版本检测失败:%d', worker_params.host, response.status)
continue
content = decompress_readers['br'](response).read()
content = decompress_readers[response.headers['Content-Encoding']](response).read()
ver = re.search(b'GotoX remote server ([\d\.]+) in CloudFlare Workers', content)
if ver:
ver = ver.groups()[0].decode()
Expand Down
2 changes: 1 addition & 1 deletion local/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '3.9.0'
__version__ = '3.9.0post1'

0 comments on commit a2d6135

Please sign in to comment.