mirror of
https://github.com/assenzostefano/notify-game-epicgames.git
synced 2025-01-06 21:01:47 +01:00
YEA I FIX IT
This commit is contained in:
parent
f2d83f1295
commit
282a234a02
9
index.py
9
index.py
@ -1,12 +1,11 @@
|
|||||||
#Every 10s check if there are new games
|
|
||||||
import requests
|
import requests
|
||||||
#Libraries for Windows notification
|
|
||||||
from win10toast import ToastNotifier
|
from win10toast import ToastNotifier
|
||||||
|
|
||||||
url = "https://api.plenusbot.xyz/epic_games?country=IT"
|
url = "https://api.plenusbot.xyz/epic_games?country=IT"
|
||||||
response = requests.get(url).json()
|
response = requests.get(url).json()
|
||||||
# Title of current games
|
# Title of current games
|
||||||
current_games = response['currentGames'][0]['title']
|
current_games_title = response['currentGames'][0]['title']
|
||||||
|
|
||||||
toaster = ToastNotifier()
|
toast = ToastNotifier()
|
||||||
toaster.show_toast("New free game on the Epic Games Store:", current_games, icon_path="epicgames.png")
|
toast.show_toast(title="New games!", msg="There is a new game on Epic Games Store " + current_games_title , icon_path="")
|
Loading…
Reference in New Issue
Block a user