Skip to content

Instantly share code, notes, and snippets.

@mrhalix
Created October 21, 2023 10:00
Show Gist options
  • Save mrhalix/9fa780a6f936271a5b56d1a19bda62e5 to your computer and use it in GitHub Desktop.
Save mrhalix/9fa780a6f936271a5b56d1a19bda62e5 to your computer and use it in GitHub Desktop.
Query cinemas for the specific time and movie
import requests
import json
txt = requests.get("https://cinematicket.org/api/v1/cinematicket/home/movies/6062/?city=235").text
jdat = json.loads(txt)
for cinema in jdat['cinemas'][0]['cinemas']:
for time in cinema['halls']:
for session in cinema['halls'][time]['sessions']:
start_time = session['start_at']
if start_time == "2023-10-20T19:00:00+03:30":
print(cinema['cinema']['name_fa'])
# print(cinema['halls'][time]['name'])
print(cinema['cinema']['address'])
print()
print()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment