aboutsummaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
authornavanchauhan <navanchauhan@gmail.com>2022-05-22 11:41:03 -0600
committernavanchauhan <navanchauhan@gmail.com>2022-05-22 11:41:03 -0600
commit801289d123b6e598110a5a1af96605fce9573f7c (patch)
tree052dc095ac1d9a2725918fb5622484ef63a41d25 /main.py
parent3c506e9c5d0408a1ba0fa637d467a2a8a821da1f (diff)
simplified
Diffstat (limited to 'main.py')
-rw-r--r--main.py31
1 files changed, 16 insertions, 15 deletions
diff --git a/main.py b/main.py
index e2c8adb..fbb7b4c 100644
--- a/main.py
+++ b/main.py
@@ -39,22 +39,23 @@ params = {
def create_movie_dict(movie: dict):
- movie = {
- "title": movie["movie"]["title"],
- "overview": movie["movie"]["overview"],
- "genres": movie["movie"]["genres"],
- "language": movie["movie"]["language"],
- "year": int(movie["movie"]["year"]),
- "trakt_id": movie["movie"]["ids"]["trakt"],
- "released": movie["movie"]["released"],
- "runtime": int(movie["movie"]["runtime"]),
- "country": movie["movie"]["country"],
- "rating": int(movie["movie"]["rating"]),
- "votes": int(movie["movie"]["votes"]),
- "comment_count": int(movie["movie"]["comment_count"]),
- "tagline": movie["movie"]["tagline"]
+ m = movie["movie"]
+ movie_dict = {
+ "title": m["title"],
+ "overview": m["overview"],
+ "genres": m["genres"],
+ "language": m["language"],
+ "year": int(m["year"]),
+ "trakt_id": m["ids"]["trakt"],
+ "released": m["released"],
+ "runtime": int(m["runtime"]),
+ "country": m["country"],
+ "rating": int(m["rating"]),
+ "votes": int(m["votes"]),
+ "comment_count": int(m["comment_count"]),
+ "tagline": m["tagline"]
}
- return movie
+ return movie_dict