Skip to content

Commit

Permalink
do not show offers that were never valid
Browse files Browse the repository at this point in the history
  • Loading branch information
eikowagenknecht committed Feb 25, 2022
1 parent ecbd545 commit 1d35783
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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: <https://partner.steamgames.com/doc/webapi/ISteamApps>
All games: <http://api.steampowered.com/ISteamApps/GetAppList/v0002/?format=json>
Game details: <https://store.steampowered.com/api/appdetails?appids=10> > metacritic
<https://store.steampowered.com/app/10/>
Storefront API: <https://wiki.teamfortress.com/wiki/User:RJackson/StorefrontAPI>
- [ ] Telegram Bot / Notifications
- [ ] Mail notifications (for offers that are valid only for a short time (less than 1 day))

### Scrapers

Expand Down
4 changes: 2 additions & 2 deletions app/feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 1d35783

Please sign in to comment.