From 338fef2fac680ed429c008b58c00c1f40ff2adb6 Mon Sep 17 00:00:00 2001 From: derrod Date: Fri, 16 Sep 2022 12:56:53 +0200 Subject: [PATCH] [api] Pin store user-agent until better solution is found For some reason using a newer version gives users a Cloudflare error page. That is of course not possible to resolve in this context, and until I can figure out a better way to solve this, we'll just use an old version that does still work. --- legendary/api/egs.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/legendary/api/egs.py b/legendary/api/egs.py index 6c511cf..fe3765b 100644 --- a/legendary/api/egs.py +++ b/legendary/api/egs.py @@ -15,7 +15,8 @@ from legendary.models.gql import * class EPCAPI: _user_agent = 'UELauncher/11.0.1-14907503+++Portal+Release-Live Windows/10.0.19041.1.256.64bit' - _store_user_agent = 'EpicGamesLauncher/11.0.1-14907503+++Portal+Release-Live' + # ToDo figure out why updating this past 14.0.8 causes a CF captcha page :/ + _store_user_agent = 'EpicGamesLauncher/14.0.8-22004686+++Portal+Release-Live' # required for the oauth request _user_basic = '34a02cf8f4414e29b15921876da36f9a' _pw_basic = 'daafbccc737745039dffe53d94fc76cf' @@ -64,7 +65,7 @@ class EPCAPI: # update user-agent if version := egs_params['version']: self._user_agent = f'UELauncher/{version} Windows/10.0.19041.1.256.64bit' - self._store_user_agent = f'EpicGamesLauncher/{version}' + # self._store_user_agent = f'EpicGamesLauncher/{version}' self.session.headers['User-Agent'] = self._user_agent self.unauth_session.headers['User-Agent'] = self._user_agent # update label