Commit 330def5f authored by init6's avatar init6

get them drugs

parent 4a5f513f
import requests
import json
API_KEY = "<enter_key>"
def check_covid(zip_code):
headers = {
'authority': '',
'sec-ch-ua': '"Chromium";v="88", "Google Chrome";v="88", ";Not A Brand";v="99"',
'accept': 'application/json',
'dnt': '1',
'x-distil-ajax': 'xebztatfusvxtdxdzzerd',
'sec-ch-ua-mobile': '?0',
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.190 Safari/537.36',
'content-type': 'application/json',
'origin': '',
'sec-fetch-site': 'same-origin',
'sec-fetch-mode': 'cors',
'sec-fetch-dest': 'empty',
'referer': '',
'accept-language': 'en-US,en;q=0.9',
data = {
"apiKey": API_KEY,
res ='', headers=headers, data=json.dumps(data))
res_json = res.json()
if res_json['responseMetaData']['statusDesc'].lower() == 'success':
return res_json['responsePayloadData']
return False
def run():
zip_codes = ['76102', '75025', '79007']
for zip_code in zip_codes:
available = check_covid(zip_code)
if available:
print('Location {} has dates available.\n'.format(zip_code))
print(json.dumps(available, indent=4, sort_keys=True))
if __name__ == '__main__':
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment