Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -152,11 +152,12 @@ async def parentalguide(request: Request):
|
|
| 152 |
imdb_id = data.get("imdb_id")
|
| 153 |
tmdb_id = data.get("tmdb_id",None)
|
| 154 |
if tmdb_id is not None:
|
| 155 |
-
url = f"https://api.themoviedb.org/3/
|
| 156 |
params = {"api_key": TMDB_API_KEY}
|
| 157 |
response = requests.get(url, params=params)
|
| 158 |
if response.status_code == 200:
|
| 159 |
data = response.json()
|
|
|
|
| 160 |
imdb_id = data.get("imdb_id")
|
| 161 |
print(imdb_id)
|
| 162 |
ia = Cinemagoer()
|
|
|
|
| 152 |
imdb_id = data.get("imdb_id")
|
| 153 |
tmdb_id = data.get("tmdb_id",None)
|
| 154 |
if tmdb_id is not None:
|
| 155 |
+
url = f"https://api.themoviedb.org/3/tv/{tmdb_id}/external_ids"
|
| 156 |
params = {"api_key": TMDB_API_KEY}
|
| 157 |
response = requests.get(url, params=params)
|
| 158 |
if response.status_code == 200:
|
| 159 |
data = response.json()
|
| 160 |
+
print(data)
|
| 161 |
imdb_id = data.get("imdb_id")
|
| 162 |
print(imdb_id)
|
| 163 |
ia = Cinemagoer()
|