Служба підтримки The Movie Database

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 підтвердити повідомлення
(стрілка вправо) наступна сторінка
(стрілка вліво) попередня сторінка

Налаштування

Хочете поставити оцінку чи додати до списку?

Увійти

Немає облікового запису?

Приєднайтеся до спільноти