Starting with entertainment_center.py
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.
A simple control flow structure to give you an idea how it works:
You will need an API key to The Movie Database to access the API. To obtain a key, follow these steps:
- Register for and verify an account.
- Log into your account.
- Select the API section on left side of your account page.
- Click on the link to generate a new API key and follow the instructions.
- Put this key in the file
tmdb.py
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.
- Clone download this repository to your local machine's project directory.
- 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.
- Make sure your you've installed proper dependencies (see requrements.txt).
- In a terminal at the project directory, type 'python entertainment_center.py'. (without quotes of course)
- 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.