The Movie Database Support

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

Can't find a movie or TV show? Login to create it.

Global

s focus the search bar
p open profile menu
esc close an open window
? open keyboard shortcut window

On media pages

b go back (or to parent when applicable)
e go to edit page

On TV season pages

(right arrow) go to next season
(left arrow) go to previous season

On TV episode pages

(right arrow) go to next episode
(left arrow) go to previous episode

On all image pages

a open add image window

On all edit pages

t open translation selector
ctrl+ s submit form

On discussion pages

n create new discussion
w toggle watching status
p toggle public/private
c toggle close/open
a open activity
r reply to discussion
l go to last reply
ctrl+ enter submit your message
(right arrow) next page
(left arrow) previous page

Settings

Want to rate or add this item to a list?

Login