update User-Agent

This commit is contained in:
niyari 2024-02-16 04:16:18 +09:00
parent 9a195edbdd
commit f71d37f15f
No known key found for this signature in database
GPG Key ID: B4370780AB69E7B7
2 changed files with 5 additions and 5 deletions

View File

@ -247,7 +247,7 @@ def get_gtoken(f_gen_url, session_token, ver):
'Content-Length': '436',
'Accept': 'application/json',
'Connection': 'Keep-Alive',
'User-Agent': 'Dalvik/2.1.0 (Linux; U; Android 7.1.2)'
'User-Agent': 'Dalvik/2.1.0 (Linux; U; Android 14; Pixel 7a Build/UQ1A.240105.004)'
}
body = {
@ -325,7 +325,7 @@ def get_gtoken(f_gen_url, session_token, ver):
'Content-Length': str(990 + len(f)),
'Connection': 'Keep-Alive',
'Accept-Encoding': 'gzip',
'User-Agent': f'com.nintendo.znca/{nsoapp_version}(Android/7.1.2)',
'User-Agent': f'com.nintendo.znca/{nsoapp_version}(Android/14)',
}
url = "https://api-lp1.znc.srv.nintendo.net/v3/Account/Login"
@ -368,7 +368,7 @@ def get_gtoken(f_gen_url, session_token, ver):
'Content-Type': 'application/json; charset=utf-8',
'Content-Length': '391',
'Accept-Encoding': 'gzip',
'User-Agent': f'com.nintendo.znca/{nsoapp_version}(Android/7.1.2)'
'User-Agent': f'com.nintendo.znca/{nsoapp_version}(Android/14)'
}
body = {}

4
s3s.py
View File

@ -53,9 +53,9 @@ F_GEN_URL = CONFIG_DATA["f_gen"] # endpoint for generating f (imink
thread_pool = ThreadPoolExecutor(max_workers=2)
# SET HTTP HEADERS
DEFAULT_USER_AGENT = 'Mozilla/5.0 (Linux; Android 11; Pixel 5) ' \
DEFAULT_USER_AGENT = 'Mozilla/5.0 (Linux; Android 14; Pixel 7a) ' \
'AppleWebKit/537.36 (KHTML, like Gecko) ' \
'Chrome/94.0.4606.61 Mobile Safari/537.36'
'Chrome/120.0.6099.230 Mobile Safari/537.36'
APP_USER_AGENT = str(CONFIG_DATA.get("app_user_agent", DEFAULT_USER_AGENT))