دعم الموقع

Hi everyone. I'm making a simple python script that would compare two movies ( inputed by the user) and compare them based on their ratings, popularity, etc.. RIght now i'm having trouble understanding the methods and how to use them in my python script. Can someone explain how to call the methods, and how to create the objects/instances. this is my code so far, which doesn't output information on the 2 moveies ( becuase there are two 'responses'. I can't just change that into response 2, and i'm confused on how to sue the search.results). Thanks!

code:

import tmdbsimple as tmdb
tmdb.API_KEY='my key'
search = tmdb.Search()
Userinput=input('Enter first movie name:')
response = search.movie(query=Userinput)
Userinput2=input('Enter Second movie name:')
response = search.movie(query=Userinput2)
for s in (search.results):
 print(s['title'], s['popularity'])

(you might not be able to read the code cuz the fourm formatting messes it up. Paste into word or something to see it properly)

output:

Enter first movie name:bourne
Enter Second movie name:titanic
Titanic 2.65792
Titanic 0.138529
Titanic 0.003383
Titanic 0.002762
Titanic 2 0.350961
Titanic 2000 0.223806
Titanic : L'incroyable tragédie 0.0003
Buffet Titanic 0.1
Asia's Titanic 0.0
Titanic Arrogance 0.00321
Titanic Revealed 0.000429
Titanic Town 0.000171
The Titanic 0.0
Words of the Titanic 0.004257
Save the Titanic With Bob Ballard 0.001941
Titanic: The Shocking Truth 0.001714
Titanic: Birth of a Legend 0.000429
Titanic - One voyage 0.048239
Raise the Titanic 0.193453
S.O.S. Titanic 0.003114

لم تجد الفلم أو المسلسل ؟ سجل دخولك و انشئها

عام

s ركز شريط البحث
p افتح قائمة الملف الشخصي
esc اغلق النافذة المفتوحة
? افتح نافذة اختصارات لوحة المفاتيح

على كافة صفحات الوسائط

b ارجع للخلف (او للصفحة الام عند التطبيق)
e انتقل لصفحة التعديل

على كافة صفحات موسم المسلسل

(السهم الايمن) انتقل للموسم التالي
(السهم الايسر) انتقل للموسم السابق

على كافة صفحات حلقة المسلسل

(السهم الايمن) انتقل للحلقة التالية
(السهم الايسر) انتقل للحلقة السابقة

على كافة صفحات الصور

a افتح صفحة اضافة الصورة

على كافة صفحات التعديل

t افتح محدد الترجمة
ctrl+ s ارسال النموذج

على صفحات المناقشة

n انشى نقاش جديد
w تبديل حالة المتابعة
p تبديل عام / خاص
c تبديل اغلاق / فتح
a افتح الانشطة
r رد على النقاش
l انتقل لأخر رد
ctrl+ enter أرسل رسالتك
(السهم الايمن) الصفحة التالية
(السهم الايسر) الصفحة السابقة

الاعدادات

هل تريد تقييم او اضافة هذا العنصر للقائمة؟

تسجيل الدخول