Skip to content

Instantly share code, notes, and snippets.

@thunderInfy
Last active May 27, 2021 21:35
Show Gist options
  • Save thunderInfy/0780cbbf0a9d0cbae87ed064c6cd78d7 to your computer and use it in GitHub Desktop.
Save thunderInfy/0780cbbf0a9d0cbae87ed064c6cd78d7 to your computer and use it in GitHub Desktop.
from datetime import date
import json
import time
import requests
from call import *
with open("data.json","r") as f:
data = json.load(f)
url = "https://cdn-api.co-vin.in/api/v2/appointment/sessions/public/calendarByPin?pincode=%s&date=%s"%(data['pincode'], date.today().strftime("%d-%m-%Y"))
header = {'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36'}
res = requests.get(url, headers = header)
R = res.json()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment