diff --git a/dailyreleases/stores/__init__.py b/dailyreleases/stores/__init__.py index 21b7148..d50d3bd 100644 --- a/dailyreleases/stores/__init__.py +++ b/dailyreleases/stores/__init__.py @@ -25,6 +25,7 @@ def find_store_links(game_name: str) -> Dict[str, str]: "origin.com": "Origin", "ubi(soft)?.com": "Ubisoft", "www.microsoft.com/.*p": "Microsoft Store", + "epicgames.com/store": "Epic Games", "itch.io": "Itch.io", "bigfishgames.com/games": "Big Fish Games", "gamejolt.com": "Game Jolt", @@ -33,7 +34,7 @@ def find_store_links(game_name: str) -> Dict[str, str]: } # Multiple store links are sometimes returned, but we believe in Google's algorithm and choose the first one - for link in web_search(f"{game_name} buy"): + for link in web_search(f"{game_name} game buy"): for store_url, store_name in known_stores.items(): if re.search(store_url, link, flags=re.IGNORECASE): return {store_name: link} diff --git a/tests/test_parse_dirname.py b/tests/test_parse_dirname.py index cb52b0c..067622d 100644 --- a/tests/test_parse_dirname.py +++ b/tests/test_parse_dirname.py @@ -129,6 +129,11 @@ class ParseDirnameTestCase(unittest.TestCase): r = parsing.parse_pre(pre) self.assertIn("gog.com/game/diablo", r.store_links["GOG"]) + def test_epic_games_exclusive(self): + pre = Pre("Journey-CODEX", "nfo_link", datetime.utcnow()) + r = parsing.parse_pre(pre) + self.assertIn("epicgames.com/store/en-US/product/journey", r.store_links["Epic Games"]) + def test_score_non_steam(self): pre = Pre("Ode.RIP.MULTI12-SiMPLEX", "nfo_link", datetime.utcnow()) r = parsing.parse_pre(pre)