From 211f65c4c6ff4ea720d8758ba7cf92353ee49049 Mon Sep 17 00:00:00 2001 From: derrod Date: Sun, 31 May 2020 02:37:37 +0200 Subject: [PATCH] [core/downloader/api] Update User-Agents --- legendary/api/egs.py | 2 +- legendary/core.py | 7 ++++++- legendary/downloader/workers.py | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/legendary/api/egs.py b/legendary/api/egs.py index 886e4bd..992b73c 100644 --- a/legendary/api/egs.py +++ b/legendary/api/egs.py @@ -10,7 +10,7 @@ from legendary.models.exceptions import InvalidCredentialsError class EPCAPI: - _user_agent = 'UELauncher/10.16.0-13286290+++Portal+Release-Live Windows/10.0.18363.1.256.64bit' + _user_agent = 'UELauncher/10.16.1-13343695+++Portal+Release-Live Windows/10.0.18363.1.256.64bit' # required for the oauth request _user_basic = '34a02cf8f4414e29b15921876da36f9a' _pw_basic = 'daafbccc737745039dffe53d94fc76cf' diff --git a/legendary/core.py b/legendary/core.py index e8c2d41..e06a69a 100644 --- a/legendary/core.py +++ b/legendary/core.py @@ -99,7 +99,12 @@ class LegendaryCore: 'X-Epic-Event-Action': 'login', 'X-Epic-Event-Category': 'login', 'X-Epic-Strategy-Flags': '', - 'X-Requested-With': 'XMLHttpRequest' + 'X-Requested-With': 'XMLHttpRequest', + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) ' + 'AppleWebKit/537.36 (KHTML, like Gecko) ' + 'EpicGamesLauncher/10.16.1-13343695+++Portal+Release-Live ' + 'UnrealEngine/4.23.0-13343695+++Portal+Release-Live ' + 'Chrome/59.0.3071.15 Safari/537.36' }) # get first set of cookies (EPIC_BEARER_TOKEN etc.) diff --git a/legendary/downloader/workers.py b/legendary/downloader/workers.py index d02606b..6182ecf 100644 --- a/legendary/downloader/workers.py +++ b/legendary/downloader/workers.py @@ -22,7 +22,7 @@ class DLWorker(Process): self.o_q = out_queue self.session = requests.session() self.session.headers.update({ - 'User-Agent': 'EpicGamesLauncher/10.16.0-13286290+++Portal+Release-Live Windows/10.0.18363.1.256.64bit' + 'User-Agent': 'EpicGamesLauncher/10.16.1-13343695+++Portal+Release-Live Windows/10.0.18363.1.256.64bit' }) self.max_retries = max_retries self.shm = SharedMemory(name=shm)