Created
October 21, 2023 10:00
-
-
Save mrhalix/9fa780a6f936271a5b56d1a19bda62e5 to your computer and use it in GitHub Desktop.
Query cinemas for the specific time and movie
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
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