Fix CheapShark returning zero deals by using dual-fetch strategy and relaxing filters

The bot stopped posting because sortBy=recent only returned low-discount deals,
and desc=1 was inverting the sort order for savings/DealRating queries. Now fetches
both recent and top-rated deals, merges with dedup. Lowered default thresholds to
20% min discount, 7.0 min rating, and $45 max price.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
prosolis
2026-03-22 02:09:27 -07:00
parent dcce744b5a
commit 29abc836d5
3 changed files with 46 additions and 10 deletions

View File

@@ -63,9 +63,9 @@ func Load() (*Config, error) {
}
}
c.MinDealRating = envFloat("MIN_DEAL_RATING", 8.0)
c.MinDiscountPercent = envInt("MIN_DISCOUNT_PERCENT", 50)
c.MaxPriceUSD = envFloat("MAX_PRICE_USD", 20)
c.MinDealRating = envFloat("MIN_DEAL_RATING", 7.0)
c.MinDiscountPercent = envInt("MIN_DISCOUNT_PERCENT", 20)
c.MaxPriceUSD = envFloat("MAX_PRICE_USD", 45)
c.DatabasePath = envStr("DATABASE_PATH", "deals.db")
intro := strings.ToLower(os.Getenv("SEND_INTRO_MESSAGE"))