a guest Feb 28th, 2020 127 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- import requests
- import re
- from time import sleep
- from datetime import datetime
- import ctypes
- import threading
- MessageBox = ctypes.windll.user32.MessageBoxW
- def check_issues():
- f = None
- while f is None:
- issues = re.search(r'''<p style="font-family:'Orbitron', sans-serif; font-size:40px; text-align: center; background-color: #000000; color: #ffffff;">(.+?)</p>''', f.text, re.MULTILINE).groups()
- print(str(datetime.today()) + " " + issues)
- issues = "not found"
- prev_issues = ""
- while True:
- cur_issues = check_issues()
- if cur_issues != prev_issues:
- threading.Thread(target=MessageBox, args=(None, 'Current GeoFront Issue Count at ' + str(datetime.today()) + ': ' + cur_issues + '\r\n', 'GeoFront Issues Update', 0x00001000)).start()
- prev_issues = cur_issues
RAW Paste Data