AmirShabani
commited on
Commit
•
a684e88
1
Parent(s):
45d4c99
Update app.py
Browse files
app.py
CHANGED
@@ -37,6 +37,8 @@ def get_data(movie):
|
|
37 |
if data['Response'] == 'True': # Check if the response is successful
|
38 |
status = data['Response']
|
39 |
poster = data["Poster"]
|
|
|
|
|
40 |
title = data["Title"]
|
41 |
year = data["Year"]
|
42 |
director = data["Director"]
|
@@ -54,17 +56,7 @@ def get_data(movie):
|
|
54 |
"rating": rating,
|
55 |
"year" : year
|
56 |
}
|
57 |
-
|
58 |
-
return {
|
59 |
-
"status": 'False',
|
60 |
-
"poster": 'https://en.wikiquote.org/wiki/Black',
|
61 |
-
"title": 'Movie not found!',
|
62 |
-
"director": '',
|
63 |
-
"cast": '',
|
64 |
-
"genres": '',
|
65 |
-
"rating": '',
|
66 |
-
"year" : ''
|
67 |
-
}
|
68 |
|
69 |
# Recommendation Function
|
70 |
from core import output_list
|
|
|
37 |
if data['Response'] == 'True': # Check if the response is successful
|
38 |
status = data['Response']
|
39 |
poster = data["Poster"]
|
40 |
+
if not isinstance(poster, str):
|
41 |
+
poster = "https://t2.gstatic.com/licensed-image?q=tbn:ANd9GcRav8An8wQSdccA_9fjnx0W_SH3xunzQXaitfpWmZpUKiLfKpMNRY_kZf5-6EQk2ZSi"
|
42 |
title = data["Title"]
|
43 |
year = data["Year"]
|
44 |
director = data["Director"]
|
|
|
56 |
"rating": rating,
|
57 |
"year" : year
|
58 |
}
|
59 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
|
61 |
# Recommendation Function
|
62 |
from core import output_list
|