A website generator that generates the posters and youtube trailers of your favorite movies.
- Python 3
- Any editor to edit the files
-
Obtain OMDb API key from here.
-
Open
entertainment_center.py
file and add the OMBDb API key on line number 9.OMDBapikey = "" # Add your api key in between the quotes
-
Obtain youtube API key from here.
-
In the same file add the youtube key on line number 10.
youtubeAPIkey = "" # Add your youtube api key in between the quotes
-
In the
names
array write your list of favorite movies in an Comma Seperated way. For examplenames = ["forrest gump","Avengers","avatar","inception","fight club","the matrix"]
-
After editing just save the file.
-
Open Command Prompt/ Terminal and enter the following command to generate the webpage.
python entertainment_center.py
-
Now
index.html
file is generated in the same folder after successful execution of command.
entertainment_center.py
: It contains the main code that calls the APIs and does the instantiations and website build.media.py
: Enables us to createMovie
objects.fresh_tomatoes.py
: Takes in a list ofMovie
objects, and returns a beautiful HTML webpage with the specified movies.