Suport de 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

No trobeu una pel·lícula o una sèrie? Inicieu la sessió per a crear-la.

Global

s centra la barra de cerca
p obre el menú del perfil
esc tanca una finestra oberta
? obre la finestra de dreceres de teclat

A les pàgines de materials

b torna enrere (o la superior quan sigui aplicable)
e ves a la pàgina d'edició

A les pàgines de temporades

(fletxa dreta) ves a la temporada següent
(fletxa esquerra) ves a la temporada anterior

A les pàgines d'episodis

(fletxa dreta) ves a l'episodi següent
(fletxa esquerra) ves a l'episodi anterior

A totes les pàgines d'imatges

a obre la finestra d'afegir imatges

A totes les pàgines d'edició

t obre el selector de traducció
ctrl+ s envia el formulari

A les pàgines de debat

n crea un debat nou
w canvia l'estat de visualització
p canvia públic/privat
c tanca o obre
a obre activitat
r resposta al debat
l ves a la darrera resposta
ctrl+ enter envieu el vostre missatge
(fletxa dreta) pàgina següent
(fletxa esquerra) pàgina anterior

Configuracions

Desitgeu valorar o afegir aquest element a una llista?

Inicieu la sessió