mirror of
https://github.com/stijndcl/didier.git
synced 2026-04-07 23:55:46 +02:00
Scraping & parsing for Steam
This commit is contained in:
parent
deefeb1106
commit
855f60727b
10 changed files with 338 additions and 21 deletions
|
|
@ -15,6 +15,6 @@ async def add_free_games(session: AsyncSession, game_ids: list[int]):
|
|||
|
||||
async def filter_present_games(session: AsyncSession, game_ids: list[int]) -> list[int]:
|
||||
"""Filter a list of game IDs down to the ones that aren't in the database yet"""
|
||||
query = select(FreeGame.free_game_id).where(FreeGame.free_game_id.in_(game_ids))
|
||||
matches: list[int] = (await session.execute(query)).scalars().all()
|
||||
statement = select(FreeGame.free_game_id).where(FreeGame.free_game_id.in_(game_ids))
|
||||
matches: list[int] = (await session.execute(statement)).scalars().all()
|
||||
return list(set(game_ids).difference(matches))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue