Skip to content
Movie Trailer Project
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Python project to dynamically generate a web page from a list of movies.

Starting with you will be asked for input in a terminal window - Do you want to see my favorite movies (type 'm'), or search for your favorite movies (type 's')?

If you search for your favorite, you will be given another option to input movie title keywords, for example, "star wars".

A search will be done using The Movie Database (TMDb)'s API. As each matching movie is found, the terminal will output the name. The most popular will be used to generate a browser window (in a new tab) displaying the title with a movie poster which is linked to a popout YouTube video of the movie's trailer.

For more information on the API, see TMDb API.

Control flow diagram

A simple control flow structure to give you an idea how it works:

structure diagram


You will need an API key to The Movie Database to access the API. To obtain a key, follow these steps:

  1. Register for and verify an account.
  2. Log into your account.
  3. Select the API section on left side of your account page.
  4. Click on the link to generate a new API key and follow the instructions.
  5. Put this key in the file for the variable 'key'.


From the command line. Make adjustments, if needed, for using an IDE.

  • Take a look at the next bullet, just in case you want to do that now.
  1. Clone download this repository to your local machine's project directory.
  2. Open a terminal window and cd into the project's directory.
  • If you haven't already, create a virtual environment for your project and activate it.
  1. Make sure your you've installed proper dependencies (see requrements.txt).


  1. In a terminal at the project directory, type 'python'. (without quotes of course)
  2. Follow prompt.


  • Python 3 only
  • API key from The Movie Database (TMDb)
  • Package: requests

Only requests is used because of the limited scope and need from TMDb API. If this program expands, a more wide-ranging TMDb API wrapper should be used. tmdbsimple is that wrapper. :)

A short example walk through video is here.

You can’t perform that action at this time.