Skip to content

Commit

Permalink
fix: cant handle compressed data
Browse files Browse the repository at this point in the history
  • Loading branch information
itschasa committed Nov 17, 2023
1 parent dfbaa86 commit 5f74394
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@

def get_client_build_number():
try:
login_page_request = request_client.get('https://discord.com/login')
login_page_request = request_client.get('https://discord.com/login', headers={"Accept-Encoding": "identity"})
login_page = login_page_request.text
build_url = 'https://discord.com/assets/' + re.compile(r'assets/+([a-z0-9]+)\.js').findall(login_page)[-2] + '.js'
build_request = request_client.get(build_url)
build_request = request_client.get(build_url, headers={"Accept-Encoding": "identity"})
build_nums = re.findall(r'(?i)Build ?Number:? ?"\)\.concat\("([0-9]*)"', build_request.text)
return int(build_nums[0])

Expand Down

0 comments on commit 5f74394

Please sign in to comment.