-
Notifications
You must be signed in to change notification settings - Fork 6
/
get_data.py
43 lines (36 loc) · 881 Bytes
/
get_data.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import asyncio
import pprint
import aiohttp
from custom_components.nintendo_wishlist.eshop import EShop
WISHLIST = [
"Super Mario Maker",
"My Friend Pedro",
"Timespinner",
"Darkwood",
"Aggelos",
"Blaster Master Zero 2",
"OlliOlli",
"Shantae",
"The Mummy Demastered",
"Salt and Sanctuary",
"Dead Cells",
"Dark Souls",
"Creature in the Well",
"Spyro Reignited",
"The Touryst",
"Cadence of Hyrule",
"Carrion",
"Evergate",
"Rock'N Racing Off Road DX",
"Red Death",
"Golem Gates",
]
async def main():
async with aiohttp.ClientSession() as client:
eshop = EShop("US", client, WISHLIST)
games = await eshop.fetch_on_sale()
pprint.pprint(games)
print(len(games))
if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.run_until_complete(main())