<repo_name>rickertl/FSND_movie-page<file_sep>/entertainment_center.py
# importing fresh_tomatoes to get access to open_movies_page function
import fresh_tomatoes
# importing media to get access to Movie() class
import media

# listing of movie objects/instances for Movie() class
spiderman = media.Movie(
    "Spider-Man",
    "A high school student who turns to crimefighting after developing " +
    "spider-like super powers.",
    "http://upload.wikimedia.org/wikipedia/en/f/f3/Spider-Man2002Poster.jpg",
    "https://www.youtube.com/watch?v=O7zvehDxttM",
    "http://www.rottentomatoes.com/m/spiderman/")

spiderman2 = media.Movie(
    "Spider-Man 2",
    "Set two years after the events of Spider-Man, the film focuses on " +
    "<NAME> struggling to manage both his personal life and his " +
    "duties as Spider-Man, while Dr. <NAME> (Doctor Octopus) becomes" +
    " diabolical following a failed experiment and his wife's death.",
    "http://upload.wikimedia.org/wikipedia/en/0/02/Spider-Man_2_Poster.jpg",
    "https://www.youtube.com/watch?v=nbp3Ra3Yp74",
    "http://www.rottentomatoes.com/m/spiderman_2/")


spiderman3 = media.Movie(
    "Spider-Man 3",
    "Set months after the events of Spider-Man 2, <NAME> has become " +
    "a cultural phenomenon as Spider-Man, while <NAME> continues " +
    "her Broadway career.",
    "http://upload.wikimedia.org/wikipedia/en/thumb/7/7a/Spider-Man_3%2C_" +
    "International_Poster.jpg/220px-Spider-Man_3%2C_International_Poster.jpg",
    "https://www.youtube.com/watch?v=wPosLpgMtTY",
    "http://www.rottentomatoes.com/m/spiderman_3/")


iron_man = media.Movie(
    "Iron Man",
    "<NAME>, an industrialist and master engineer, builds a powered " +
    "exoskeleton and becomes the technologically advanced superhero Iron Man.",
    "http://upload.wikimedia.org/wikipedia/en/7/70/Ironmanposter.JPG",
    "https://youtu.be/7H0yo-lDuk0",
    "http://www.rottentomatoes.com/m/iron_man/")


iron_man2 = media.Movie(
    "Iron Man 2",
    "Six months after the events of Iron Man, <NAME> is resisting calls" +
    " by the United States government to hand over the Iron Man technology " +
    "while also combating his declining health from the arc reactor in his " +
    "chest.",
    "http://upload.wikimedia.org/wikipedia/en/e/ed/Iron_Man_2_poster.jpg",
    "https://www.youtube.com/watch?v=FNQowwwwYa0",
    "http://www.rottentomatoes.com/m/iron_man_2/")


iron_man3 = media.Movie(
    "Iron Man 3",
    "<NAME> tries to recover from posttraumatic stress disorder caused " +
    "by the events of The Avengers, while investigating a terrorist " +
    "organization led by the mysterious Mandarin.",
    "http://upload.wikimedia.org/wikipedia/en/d/d5/Iron_Man_3_theatrical_" +
    "poster.jpg",
    "https://youtu.be/RsxsAN_bsvQ",
    "http://www.rottentomatoes.com/m/iron_man_3/")

# creating an array of movies
movies = [spiderman, spiderman2, spiderman3, iron_man, iron_man2, iron_man3]
# passing movies array as arguement to open_movies_page function
fresh_tomatoes.open_movies_page(movies)

<file_sep>/README.txt
##Overview##
Server-side code to store a list of my favorite movies,
including box art imagery, movie trailer URL, and link
to Rotten Tomatoes page.

Code will generate a static web page allowing visitors
to browse movies, watch the trailers, and visit Rotten
Tomatoes page.


##Requirements##
1) Make sure these files are in the same directory
- entertainment_center.py
- fresh_tomatoes.py
- media.py
2) Have Python 2.7.9 Shell installed

##How To##
1) Open IDLE app
2) Open 'entertainment_center.py'
3) Goto and select 'Run > Run Module'
4) fresh_tomatoes.html will open in your browser
5) Browse my favorite movies
6) To watch trailers, click on movie box art image
7) To view Rotten Tomatoes page, click link
<file_sep>/media.py
# importing webbrowser module to use for playing youtube video
import webbrowser


class Movie():
    # creating/initializing space in memory for movie details data
    """ This class provides a way store movie related information """

    def __init__(
        self, movie_title, movie_storyline, poster_image, trailer_youtube,
            rotten_page):
        self.title = movie_title
        self.storyline = movie_storyline
        self.poster_image_url = poster_image
        self.trailer_youtube_url = trailer_youtube
        self.rotten = rotten_page

    # calling webbrowser.open and creating/initializing space in memory to
    # link to youtube trailer
    def show_trailer(self):
        webbrowser.open(self.trailer_youtube_url)
