From 949eceb9838622d58cf5c12f1e9cf1f94031c24c Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 28 Feb 2026 05:14:27 +0000 Subject: [PATCH] Filter ITAD deals to only include games and DLC Non-game content (courses, software bundles) was showing up in deal posts. Filter on the API's type field to only include entries with type "game" or "dlc". https://claude.ai/code/session_01B7YPGrE3NatkwadCXVjv2j --- gaming_deals_bot/itad_deals.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gaming_deals_bot/itad_deals.py b/gaming_deals_bot/itad_deals.py index d1dea7b..c9bde98 100644 --- a/gaming_deals_bot/itad_deals.py +++ b/gaming_deals_bot/itad_deals.py @@ -81,11 +81,18 @@ async def fetch_deals( if not deal_data: continue + # Only include actual games and DLC — skip non-game content + # (courses, software bundles, etc.) + entry_type = entry.get("type") + title = entry.get("title", "?") + if entry_type not in ("game", "dlc"): + logger.debug("Filtered out %s: type=%s", title, entry_type) + continue + cut = deal_data.get("cut", 0) price_amount = deal_data.get("price", {}).get("amount", 0) regular_amount = deal_data.get("regular", {}).get("amount", 0) currency = deal_data.get("price", {}).get("currency", "USD") - title = entry.get("title", "?") # Apply filters if cut < min_discount: