From 6435e9841fe38c20643ea07ab8dc161ced40575d Mon Sep 17 00:00:00 2001 From: jackra1n <45038833+jackra1n@users.noreply.github.com> Date: Thu, 29 Aug 2024 18:01:16 +0200 Subject: [PATCH] Fix epic games store free bundle URL --- extensions/free_games.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/extensions/free_games.py b/extensions/free_games.py index c686ed2..fbec344 100644 --- a/extensions/free_games.py +++ b/extensions/free_games.py @@ -60,8 +60,12 @@ def _create_store_link(self, game_info_json: str) -> str: page_slug = game_info_json["catalogNs"]["mappings"][0]["pageSlug"] if page_slug is None and game_info_json["productSlug"]: page_slug = game_info_json["productSlug"] + if "bundles" in [category["path"] for category in game_info_json["categories"]]: + page_slug = "bundles/" + page_slug + else: + page_slug = "p/" + page_slug - return f"https://www.epicgames.com/store/en-US/p/{page_slug}" + return f"https://www.epicgames.com/store/en-US/{page_slug}" def _create_start_date(self, game_info_json: str) -> datetime: return self._parse_date(game_info_json, "startDate")