From 1d357837ef79532c4f2cd3eb466020f008d38741 Mon Sep 17 00:00:00 2001 From: Eiko Wagenknecht Date: Fri, 25 Feb 2022 10:55:11 +0100 Subject: [PATCH] do not show offers that were never valid --- README.md | 10 ++++++++-- app/feed.py | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 0f495764..32656046 100644 --- a/README.md +++ b/README.md @@ -32,12 +32,18 @@ This project is in ongoing development, not yet usable for the average user and - [ ] Error handling - [ ] Notify by mail when something goes wrong (e.g. a source cannot be scraped) - [ ] Support multiple languages (at least EN and DE) -- [ ] Push mails for offers that are valid only for a short time (less than 1 day) ### Advanced features - [x] Add a preview picture -- [ ] Add the metacritic score for the game and/or other useful information +- [ ] Add the steam score for the game + API: + All games: + Game details: > metacritic + + Storefront API: +- [ ] Telegram Bot / Notifications +- [ ] Mail notifications (for offers that are valid only for a short time (less than 1 day)) ### Scrapers diff --git a/app/feed.py b/app/feed.py index bd4960d3..12c7d711 100644 --- a/app/feed.py +++ b/app/feed.py @@ -40,8 +40,8 @@ def generate_feed(offers: list[LootOffer], out_file: Path) -> None: # - Subtitle for offer in offers: - if offer.valid_from and offer.valid_from > datetime.now(timezone.utc): - # Skip future entries + if offer.valid_from > offer.seen_last: + # Skip future entries and entries that are no longer seen on valid_from date continue feed_entry = feed_generator.add_entry()