I\'m doing an assignment (creating an online search) using Python and TMDB datab
ID: 3822542 • Letter: I
Question
I'm doing an assignment (creating an online search) using Python and TMDB database. The requirements are:
A user types in the name of a movie in a text box, hitting the submit button, a search is performed on the input string in the movie database.
On the next page, display a result of all the movies that match the user's search string in the form of a table, containing a header with columns for movie name, popularity, release date, and the movie's ID. ( Hint: Refer to the examples on the tmdbsimple website. )
Add a Back link - At the bottom of the page that contains the search results, include the following code to take you back to the first page.
Here is what I currently have:
import tmdbsimple as tmdb tmdb. API KEY API KEY movie tmdb Movies (400) info response movie print movie. title)Explanation / Answer
from Tkinter import * root = Tk() Text1 = Text(root, height=2, width=30) Text1.pack() Text1.focus_set() b = Button(root, text="Click Me", command=on_click) b.pack() def on_click(*args): from tmdb3 import searchMovie res = searchMovie(Text1.text) res len(res) soup = BeautifulSoup(webContent) a = soup.find('a', href=True, text=re.compile("Next")) if a: link = a["href"] root.bind("", on_click) root.mainloop()Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.