Created
September 22, 2017 18:06
-
-
Save yaqinking/b7abca6164366088767627ca1c164d96 to your computer and use it in GitHub Desktop.
Windows 10 local push notification python script to see Tricolour Lovestory owners number.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Windows 10 local push notification python script to see Tricolour Lovestory owners number. | |
by yaqinking | |
See image: https://i.imgur.com/fC69kJs.png | |
''' | |
import requests | |
from win10toast import ToastNotifier #https://github.com/jithurjacob/Windows-10-Toast-Notifications | |
headers = { | |
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36' | |
} | |
json = requests.get('https://steamspy.com/api.php?request=appdetails&appid=668630', headers=headers).json() | |
owners = json['owners'] | |
owners_variance = json['owners_variance'] | |
content = str.format('Owners: {0} ± {1}' ,owners, owners_variance) | |
toaster = ToastNotifier() | |
toaster.show_toast('Tricolour Lovestory steamspy', content,'./icon.ico', duration=10) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment