ConqiFanboy
Cadet 1st Year
- Registriert
- März 2021
- Beiträge
- 15
Python:
import json
from urllib.request import urlopen
import webbrowser
import tkinter
from tkinter import messagebox
import time
url = "https://api.nvidia.partners/edge/product/search?page=1&limit=9&locale=de-de&category=GPU&gpu=RTX%203070"
available = "3070 FE NOW AVAILABLE!!!"
def main():
while True:
try:
data = json.loads(urlopen(url).read())
availability = data['searchedProducts']['featuredProduct'].get('prdStatus')
if availability != "out_of_stock":
for i in range(5):
webbrowser.open("https://youtu.be/E0SN614t2WI")
print(available)
notify(available)
break
except Exception as e:
notify("Error? -> " + e.__str__())
finally:
time.sleep(60)
def notify(message):
tkinter.Tk().withdraw()
messagebox.showinfo("NOTIFICATION", message)
if __name__ == '__main__':
main()