Skip to content

Commit

Permalink
Add Steam Genres to RSS feed (#216)
Browse files Browse the repository at this point in the history
  • Loading branch information
eikowagenknecht committed Jul 30, 2023
1 parent 86a5128 commit 7964c8b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/lootscraper/feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,17 @@ async def generate_feed(
# - Summary
# Atom Optional
# - category
# Add Steam genres as categories
if offer.game and offer.game.steam_info and offer.game.steam_info.genres:
categories: list[str] = []
for genre in offer.game.steam_info.genres.split(", "):
category = {
"term": f"Genre: {genre}",
"scheme": "https://store.steampowered.com/category/",
"label": genre,
}
categories.append(category)
feed_entry.category(category=categories)
# - contributor
# - published
feed_entry.published(offer.seen_first)
Expand Down

0 comments on commit 7964c8b

Please sign in to comment.