From c33e46c3cf1783e5cfea1353bdca668acf4385ef Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 28 Feb 2026 02:47:15 +0000 Subject: [PATCH 1/2] Fix CheapShark rating filter: correct scale and skip unrated deals Two bugs fixed: 1. Function signature used old 0-100 scale defaults (min_rating: int = 80) but dealRating from CheapShark is 0-10. Updated to float = 8.0. 2. Deals with dealRating of 0.0 (unrated/insufficient data) were being filtered out as "poorly rated". Now treats 0.0 as unrated and skips the rating check, so games like Leisure Suit Larry that lack a CheapShark deal rating aren't incorrectly excluded. https://claude.ai/code/session_017eMsVwUopgmnEyd6JJedpV --- gaming_deals_bot/cheapshark.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gaming_deals_bot/cheapshark.py b/gaming_deals_bot/cheapshark.py index 4062cb3..edf2296 100644 --- a/gaming_deals_bot/cheapshark.py +++ b/gaming_deals_bot/cheapshark.py @@ -46,8 +46,8 @@ async def fetch_deals( client: httpx.AsyncClient, *, max_price: float = 20, - min_rating: int = 80, - min_discount: int = 50, + min_rating: float = 8.0, + min_discount: float = 50, page_size: int = 10, ) -> list[CheapSharkDeal]: """Fetch top deals from CheapShark across configured stores.""" @@ -81,7 +81,7 @@ async def fetch_deals( if savings < min_discount: logger.debug("Filtered out %s: savings %.1f%% < %.1f%%", title, savings, min_discount) continue - if rating < min_rating: + if rating > 0 and rating < min_rating: logger.debug("Filtered out %s: rating %.1f < %.1f", title, rating, min_rating) continue From 3f7e8196e34068900dfd2a16a27e230256cbf483 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 28 Feb 2026 02:49:28 +0000 Subject: [PATCH 2/2] Sort CheapShark deals by recency instead of deal rating The bot polls periodically for new deals, but sorting by "Deal Rating" meant it always returned the same top-rated deals and would never discover new listings that aren't in the top 10 by rating. Sorting by "recent" ensures newly added or updated deals are seen on each poll. https://claude.ai/code/session_017eMsVwUopgmnEyd6JJedpV --- gaming_deals_bot/cheapshark.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gaming_deals_bot/cheapshark.py b/gaming_deals_bot/cheapshark.py index edf2296..1879175 100644 --- a/gaming_deals_bot/cheapshark.py +++ b/gaming_deals_bot/cheapshark.py @@ -55,7 +55,7 @@ async def fetch_deals( params = { "storeID": store_ids, "upperPrice": str(int(max_price)), - "sortBy": "Deal Rating", + "sortBy": "recent", "desc": "1", "pageSize": str(page_size), }