Last active
March 25, 2018 18:49
-
-
Save sshh12/fc3867a218ed41ca6e4cd5e634b666f6 to your computer and use it in GitHub Desktop.
aka how I got my license
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
from xml.dom import minidom | |
import requests | |
import time | |
Q_ID = 17937 | |
LOC_ID = 3532 | |
DAYS = 3 | |
AUTH = "fill me" | |
TARGET_MONTH = "fill me" | |
headers = { | |
'Host':'kiosk.us3.qless.com', | |
'Accept':'application/xml, text/xml, */*; q=0.01', | |
'Content-Length':'154', | |
'X-WSSID-Authorization': AUTH, | |
'Content-Type':'application/x-www-form-urlencoded; charset=UTF-8', | |
'X-Requested-With':'XMLHttpRequest', | |
'User-Agent':'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36', | |
'Referer':f'https://kiosk.us3.qless.com/kiosk/app/home/{LOC_ID}?&queues={Q_ID}' | |
} | |
data = { | |
'end':'', | |
'locale':'en', | |
'maxDays': DAYS, | |
'partySize':'', | |
'remote':'true', | |
'start':'', | |
'timeZone':'America/Chicago', | |
'transactionTypeIds':'', | |
'wssid': AUTH | |
} | |
def check(): | |
r = requests.post(f'https://kiosk.us3.qless.com/qless/api/v1/appointment/queue/{Q_ID}/possibleBlocks', headers=headers, data=data) | |
print(r.text) | |
xml = minidom.parseString(r.text) | |
times = xml.getElementsByTagName('timeBlock'); | |
print("\n"*5) | |
for time in times: | |
displaytime = time.attributes['displayTime'].value | |
displayday = time.attributes['displayDay'].value | |
print(displaytime + " on " + displayday) | |
if TARGET_MONTH in displayday: | |
print("*"*9999) | |
print(displaytime + " on " + displayday) | |
while True: | |
check() | |
time.sleep(45) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment