Skip to content

Commit

Permalink
Fix epic games store free bundle URL
Browse files Browse the repository at this point in the history
  • Loading branch information
jackra1n committed Aug 29, 2024
1 parent 8dc582f commit 6435e98
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion extensions/free_games.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 6435e98

Please sign in to comment.