simplified

This commit is contained in:
navanchauhan 2022-05-22 11:41:03 -06:00
parent 3c506e9c5d
commit 801289d123
1 changed files with 16 additions and 15 deletions

31
main.py
View File

@ -39,22 +39,23 @@ params = {
def create_movie_dict(movie: dict): def create_movie_dict(movie: dict):
movie = { m = movie["movie"]
"title": movie["movie"]["title"], movie_dict = {
"overview": movie["movie"]["overview"], "title": m["title"],
"genres": movie["movie"]["genres"], "overview": m["overview"],
"language": movie["movie"]["language"], "genres": m["genres"],
"year": int(movie["movie"]["year"]), "language": m["language"],
"trakt_id": movie["movie"]["ids"]["trakt"], "year": int(m["year"]),
"released": movie["movie"]["released"], "trakt_id": m["ids"]["trakt"],
"runtime": int(movie["movie"]["runtime"]), "released": m["released"],
"country": movie["movie"]["country"], "runtime": int(m["runtime"]),
"rating": int(movie["movie"]["rating"]), "country": m["country"],
"votes": int(movie["movie"]["votes"]), "rating": int(m["rating"]),
"comment_count": int(movie["movie"]["comment_count"]), "votes": int(m["votes"]),
"tagline": movie["movie"]["tagline"] "comment_count": int(m["comment_count"]),
"tagline": m["tagline"]
} }
return movie return movie_dict