# -*- coding: utf-8 -*-
import media
import fresh_tomatoes
'''Here you can create new movie objects
with help of the media.Movie Class'''

if __name__ == "__main__":
    print("Thanks for using this program")

# Movie creation with media.py as template

# Toy Story movie: movie title, durration, storyline, poster_url, trailer_url
toy_story = media.Movies(
    "Toy Story",
    "81 min",
    "A Story of a boy and his toys that come to life",
    "https://images-na.ssl-images-amazon.com/images/I/81zWx2fQ5vL._SY550_.jpg",  # NOQA
    "https://www.youtube.com/watch?v=KYz2wyBy3kc")

# Avatar movie: movie title, durration, storyline, poster_url, trailer_url
avatar = media.Movies(
    "Avatar",
    "162 min",
    "A marine on AlienPlanat",
    "http://t1.gstatic.com/images?q=tbn:ANd9GcSTpa51SkJFKdByZ27eU4z0IqcP5mhbHkEHWN26lDpss4rhMk5W",  # NOQA
    "https://www.youtube.com/watch?v=5PSNL1qE6VY")

# die hard II movie: movie title, durration, storyline, poster_url, trailer_url
die_hard_two = media.Movies(
    "Die Hard II",
    "125 min",
Exemplo n.º 2
0
import media
import fresh_tomatoes

love_movie = media.Movies("Geetha Govindam",
                         "Geetha Govindam is an INDIAN classical Love story",
                         "https://moviegalleri.net/2018/06/vijay-devarakonda-rashmika-mandanna-geetha-govindam-first-look-poster-hd.html",
                         "https://www.youtube.com/watch?v=OYK2eJ0oeg8")

comedy_movie = media.Movies("Express Raja",
                            "Express raja is a decent love story with full of comedy",
                            "https://www.indiaglitz.com/express-raja-photos-telugu-movies-2553987-20291",
                            "https://www.youtube.com/watch?v=vtnKfhqEumk")


movie = [love_movie,comedy_movie]
fresh_tomatoes.open_movies_page(movie)
Exemplo n.º 3
0
import fresh_tomatoes
import media

toystory = media.Movies("toystory", "the boy and his toys come a live",
                        "https://goo.gl/j7nkk9",
                        "https://www.youtube.com/watch?v=rNk1Wi8SvNc")
the_lord = media.Movies("the lord of the rings",
                        "the story of bravy guy try to save the middel earth",
                        "https://goo.gl/VSGgVM",
                        "https://youtu.be/rCZ3SN65kIs")

movies = {toystory, the_lord}  # create varible and send two movies objects
fresh_tomatoes.open_movies_page(movies)  # use fresh_tomato to style webpage
Exemplo n.º 4
0
        "https://img1.doubanio.com/view/photo/photo/public/p2475060299.webp",
        "https://www.youtube.com/watch?v=BOD6blw4U_c"
    ],
    [
        "神奇女侠 Wonder Woman (2017)", "戴安娜的女儿,而她的体内,似乎隐藏着某种强大的未知力量",
        "https://img3.doubanio.com/view/photo/photo/public/p2460006593.webp",
        "https://www.youtube.com/watch?v=h2MXZEUys10"
    ],
    [
        "银河护卫队2 Guardians of the Galaxy Vol. 2 (2017)",
        "火箭浣熊偷走了大祭司阿耶莎的能量电池,包括星爵在内的一行人遭到了后者派出的舰队的袭击。一个神秘人物乘坐着飞船救下了银河护卫队的众人,而驾驶着飞船的不是别人,竟然正是星爵的亲生父亲伊戈",
        "https://img3.doubanio.com/view/photo/photo/public/p2454951206.webp",
        "https://www.youtube.com/watch?v=efpv3dvN8mI"
    ],
    [
        "摔跤吧!爸爸 Dangal (2016)",
        "马哈维亚曾经是一名前途无量的摔跤运动员,在放弃了职业生涯后,他最大的遗憾就是没有能够替国家赢得金牌。马哈维亚将这份希望寄托在了尚未出生的儿子身上,哪知道妻子接连给他生了两个女儿,取名吉塔。让马哈维亚没有想到的是,两个姑娘展现出了杰出的摔跤天赋,让他幡然醒悟,就算是女孩,也能够昂首挺胸的站在比赛场上,为了国家和她们自己赢得荣誉",
        "https://img3.doubanio.com/view/photo/photo/public/p2457983084.webp",
        "https://www.youtube.com/watch?v=hYGQE5AZ4dE"
    ]
]

print media.Movies.__init__.__doc__
print media.Movies.show_trailer.__doc__

for movie in movies_info:
    movie_info = media.Movies(movie[0], movie[1], movie[2], movie[3])
    my_movies.append(movie_info)

fresh_tomatoes.open_movies_page(my_movies)
Exemplo n.º 5
0
import media
import fresh_tomatoes

toy_story = media.Movies(
    "Toy story", "these story of the fictional toys",
    "http://media.comicbook.com/uploads1/2015/03/group-disney-announces-toy-story-4-is-happening-126226.jpeg",
    "https://www.youtube.com/watch?v=LJnlmJ4lqik")
print(toy_story.storyline)

christ_passion = media.Movies(
    "Passion of The Christ", "how jesus the savour of man died for our sins",
    "https://upload.wikimedia.org/wikipedia/en/6/61/Thepassionposterface-1-.jpg",
    "https://www.youtube.com/watch?v=4Aif1qEB_JU")

the_wedding_party = media.Movies(
    "The wedding party", "trying hard to maintain a good relationship",
    "https://www.bellanaija.com/wp-content/uploads/2016/08/Dozie-Dunni-AY-in-THE-WEDDING-PARTY-600x400.jpg",
    "https://www.youtube.com/watch?v=zbnXd-zCD6I")

The_boss_baby = media.Movies(
    "The boss baby", "the story about the boss baby",
    "https://statcdn.fandango.com/MPX/image/NBCU_Fandango/87/782/thebossbaby_clip_imtheboss.jpg",
    "https://youtu.be/r8kE7rSzfQs")

logan = media.Movies(
    "logan",
    "an epic marvel movie",
    "https://i.ytimg.com/vi/tuxtrmSjzIY/maxresdefault.jpg",
    "https://www.youtube.com/watch?v=Div0iP65aZo",
)
Exemplo n.º 6
0
import media
import fresh_tomatoes

#this is a list of movie instances in which
# I am passing the arguments title, storyline, poster image and trailer url.
guardians = media.Movies(
    "Guardians of the Galaxy",
    "Star-Lord (Chris Pratt) tries to find his true father.",
    "https://upload.wikimedia.org/wikipedia/en/9/95/GotG_Vol2_poster.jpg",
    "https://www.youtube.com/watch?v=sMTntxvok1M")

suicide_squad = media.Movies(
    'Suicide Squad', 'Dubbed Task Force X, the criminals '
    'unite to battle a mysterious and powerful entity,',
    'https://upload.wikimedia.org/wikipedia/en/5/50/Suicide_Squad_%28film%29_Poster.png',
    'https://www.youtube.com/watch?v=CmRih_VtVAs')

warcraft = media.Movies(
    'Warcraft', ' The film portrays the initial encounters '
    'between the humans and the orcs',
    'https://upload.wikimedia.org/wikipedia/en/5/56/Warcraft_Teaser_Poster.jpg',
    'https://www.youtube.com/watch?v=RhFMIRuHAL4')

captain_america = media.Movies(
    "Captain America civil war", "A very good movie",
    "https://upload.wikimedia.org/wikipedia/en/5/53/Captain_America_Civil_War_poster.jpg",
    "https://www.youtube.com/watch?v=uVdV-lxRPFo")

x_men = media.Movies(
    "X-Men: Apocalypse", "Another very good movie",
    "https://upload.wikimedia.org/wikipedia/en/0/04/X-Men_-_Apocalypse.jpg",
import media
import fresh_tomatoes
remo = media.Movies(
    "REMO(Telugu)", "director:Bakkiyaraj Kannan", "ratings:4.0",
    "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcT5c2xqc2DyDfRuiLVDvjHoHMYkn9AJmd7OXDvVnnnukDh2CO08Zw",
    "https://youtu.be/DZJ8NMBZW-E")

robo = media.Movies(
    "ROBO-2.O(Telugu)", "director:S.Shankar", "ratings:4.5",
    "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRuVzOOHp4srCaAAIcbroeiRpb-g1bgb5JLxRBYoQ2GEw86Q7IR3Q",
    "https://www.youtube.com/watch?v=_qOl_7qfPOM")

sarkar = media.Movies("SARKAR(Telugu)", "director:A.R. Murugadoss",
                      "ratings:3.5",
                      "https://pbs.twimg.com/media/DqBl18rVsAAU9oL.jpg",
                      "https://youtu.be/JsE4qInfmZ0")

ongolugitta = media.Movies(
    "ONGOLU GITTA(Telugu)", "director:Bhaskar", "ratings:4.5",
    "https://www.filmibeat.com/ph-big/2013/01/ongole-gitta_13596075686.jpg",
    "https://youtu.be/43wzetpFKiY")

awe = media.Movies(
    "AWE(Telugu)", "director:Prashanth Varma", "ratings:4.0 ",
    "https://www.c65.in/wp-content/uploads/c65gallery/awe-movie-releasing-today-posters/awe-movie-releasing-today-posters-0eb6205.jpg",
    "https://youtu.be/xOEscQChX7M")

gentleman = media.Movies(
    "GENTLE MAN(Telugu)", "director:Mohan Krishna Indraganti", "ratings:4.0",
    "https://i.pinimg.com/originals/a5/35/a8/a535a866730e16d0421a9b03db2bf0a0.jpg",
    "https://youtu.be/MgmowJ5r-es")
    '''
    kwargs = {'append_to_response': 'trailers'}
    movie_ = tmdb.Movies(s['id']).info(**kwargs)
    video_ = movie_.get('trailers')

    # to eliminate indexError
    for index, value in enumerate(video_['youtube']):
        if value is not 0:
            vid_source = video_['youtube'][index]['source']

    # get variables needed for media class
    trailer_youtube_url = "https://www.youtube.com/watch?v=" + vid_source
    title = list_of_movies[j]
    poster_image_url = 'http://cf2.imgobject.com/t/p/original' + \
        s['poster_path']

    # create an instance of media class for every movie
    i = media.Movies(remove_non_ascii(title),
                     remove_non_ascii(poster_image_url),
                     remove_non_ascii(trailer_youtube_url))

    # populate list for fresh tomatoes
    build_movies.append(i)

    j += 1

# print build_movies

# render page
fresh_tomatoes.open_movies_page(build_movies)
Exemplo n.º 9
0
import fresh_tomatoes
import media #module containing the class Movies

#movie database
toy_story = media.Movies("Toy Story", "https://upload.wikimedia.org/wikipedia/en/1/13/Toy_Story.jpg", "https://www.youtube.com/watch?v=KYz2wyBy3kc")
kungfu_panda = media.Movies("Kung Fu Panda", "https://upload.wikimedia.org/wikipedia/en/7/76/Kungfupanda.jpg", "https://www.youtube.com/watch?v=PXi3Mv6KMzY")
monsters_university = media.Movies("Monsters University", "https://upload.wikimedia.org/wikipedia/en/2/2a/Monsters_University_poster_3.jpg", "https://www.youtube.com/watch?v=QxrQ6BaijAY")
the_prestige = media.Movies("The Prestige", "https://upload.wikimedia.org/wikipedia/en/d/d2/Prestige_poster.jpg", "https://www.youtube.com/watch?v=o4gHCmTQDVI")
fight_club = media.Movies("Fight Club", "https://upload.wikimedia.org/wikipedia/en/f/fc/Fight_Club_poster.jpg", "https://www.youtube.com/watch?v=BdJKm16Co6M")
the_others = media.Movies("The Others", "https://upload.wikimedia.org/wikipedia/en/4/4c/TheOthers.jpg", "https://www.youtube.com/watch?v=ISch6Fi-q0A")
pirates = media.Movies("Pirates of the Caribbean: The Curse of the Black Pearl", "https://upload.wikimedia.org/wikipedia/en/8/89/Pirates_of_the_Caribbean_-_The_Curse_of_the_Black_Pearl.png", "https://www.youtube.com/watch?v=naQr0uTrH_s")
planet_apes = media.Movies("War for the Planet of the Apes", "https://upload.wikimedia.org/wikipedia/en/d/d7/War_for_the_Planet_of_the_Apes_poster.jpg", "https://www.youtube.com/watch?v=UEP1Mk6Un98")
spiderman = media.Movies("Spider-Man 3", "https://upload.wikimedia.org/wikipedia/en/7/7a/Spider-Man_3%2C_International_Poster.jpg", "https://www.youtube.com/watch?v=1bzqHbTD64w")

#storing all the movies in a list to be called by fres_tomatoes function: open_movies_page
movies = [toy_story, monsters_university, kungfu_panda, the_prestige, fight_club, the_others, planet_apes, pirates, spiderman]
#calling the fresh_tomatoes module function to create the html document for the movie database website
fresh_tomatoes.open_movies_page(movies)
Exemplo n.º 10
0
import media
import fresh_tomatoes

# instants of class Movies, need 4 arguments:
# 		title, storyline, poster image url, trailer url

batman_begins = media.Movies(
    "Batman Begins",
    "Part I of Dark Knight triology by Cristopher Nolan",
    "https://m.media-amazon.com/images/M/MV5BZmUwNGU2ZmItMmRiNC00MjhlLTg5YWUtODMyNzkxODYzMmZlXkEyXkFqcGdeQXVyNTIzOTk5ODM@._V1_SY1000_SX750_AL_.jpg",  # noqa
    "https://www.youtube.com/watch?v=neY2xVmOfUM")

the_dark_knight = media.Movies(
    "The Dark Knight",
    "Part II of Dark Knight triology by Cristopher Nolan",
    "https://m.media-amazon.com/images/M/MV5BMTMxNTMwODM0NF5BMl5BanBnXkFtZTcwODAyMTk2Mw@@._V1_SY1000_CR0,0,675,1000_AL_.jpg",  # noqa
    "https://www.youtube.com/watch?v=LDG9bisJEaI")

the_dark_knight_rises = media.Movies(
    "The Dark Knight Rises",
    "Part III of the triology",
    "https://m.media-amazon.com/images/M/MV5BMTk4ODQzNDY3Ml5BMl5BanBnXkFtZTcwODA0NTM4Nw@@._V1_.jpg",  # noqa
    "https://www.youtube.com/watch?v=g8evyE9TuYk")

# list of the created instants

movies = [batman_begins, the_dark_knight, the_dark_knight_rises]

# call open_movies_page function from fresh_tomatoes module.

fresh_tomatoes.open_movies_page(movies)
Exemplo n.º 11
0
import media
import fresh_tomatoes

# toy story
toy_story = media.Movies(
    "Toy Story", "A story of boy and his toys",
    "https://upload.wikimedia.org/wikipedia/en"
    "/1/13/Toy_Story.jpg", "https://www.youtube.com/watch?v=KYz2wyBy3kc")
# ratatouille
ratatouille = media.Movies(
    "Ratatouille", "American computeranimated comedy film",
    "https://upload.wikimedia.org/wikipedia/en/5/50/Ratatou"
    "illePoster.jpg", "https://www.youtube.com/watch?v=c3sBBRxDAqk")
# midnight_in_Paris
midnight_in_Paris = media.Movies(
    "Midnight In Paris", "American-French romantic "
    "comedy film ", "https://upload.wikimedia.org/wikipedia/en/9/9f/Midnig"
    "ht_in_Paris_Poster.jpg", "https://www.youtube.com/watch?v=BYRWfS2s2v4")

movies = [toy_story, ratatouille, midnight_in_Paris]
fresh_tomatoes.open_movies_page(movies)

# print(toy_story.story_line)
# print(media.Movies.VALID_RATINGS)
# toy_story.show_trailer()
# print(media.Movies.__doc__)
# print(media.Movies.__name__)
# print(media.Movies.__module__)
Exemplo n.º 12
0
import MovieWebStore
import media

ThorRagnarok = media.Movies(
    "Thor Ragnarok", "A Story of Thor's Sister",
    "https://images-na.ssl-images-amazon.com/images/M/MV5BMjMyNDkzMzI1OF5BMl5BanBnXkFtZTgwODcxODg5MjI@._V1_UY1200_CR90,0,630,1200_AL_.jpg",
    "https://youtu.be/ue80QwXMRHg")

avengersinfinity = media.Movies(
    "Avengers Infinity War",
    "A Story of young Man who gets Bitten by a Spider",
    "https://images.moviepilot.com/images/c_limit,q_auto:good,w_600/yrykjuw9yijoqaf4rt9d/best-fan-made-avengers-infinity-wars-posters.jpg",
    "https://youtu.be/6ZfuNTqbHE8")
SpiderManHomeComing = media.Movies(
    "Spider Man Home Coming",
    "A Story of young Man who gets Bitten by a Spider",
    "https://images-na.ssl-images-amazon.com/images/I/91hi1TaZnZL._SX342_.jpg",
    "https://youtu.be/U0D3AOldjMU")

TheDarkKnight = media.Movies(
    "The Dark Knight", "A Story of Gotham City and Batman",
    "https://images-na.ssl-images-amazon.com/images/M/MV5BMTk4ODQzNDY3Ml5BMl5BanBnXkFtZTcwODA0NTM4Nw@@._V1_UX182_CR0,0,182,268_AL_.jpg",
    "https://youtu.be/kmJLuwP3MbY")
toyStory = media.Movies(
    "Toy Story", "A story of a boy whose toys come to life",
    "https://lumiere-a.akamaihd.net/v1/images/open-uri20150422-20810-m8zzyx_5670999f.jpeg?region=0,0,300,450",
    "https://youtu.be/KYz2wyBy3kc")

Avatar = media.Movies("Avatar", "A story of a Marine on an Alien planet",
                      "http://feoamante.com/Movies/A/Avatar/avatar.jpg",
                      "https://youtu.be/aVdO-cx-McA")
import media
import fresh_tomatoes

# List of movies I enjoy
toy_story = media.Movies(
    "Toy Story", "Woody (Tom Hanks), a good-hearted cowboy doll who "
    "belongs to a young boy named Andy (John Morris), sees "
    "his position as Andy's favorite toy jeopardized when "
    "his parents buy him a Buzz Lightyear (Tim Allen) "
    "action figure. Even worse, the arrogant Buzz thinks "
    "he's a real spaceman on a mission to return to his "
    "home planet. When Andy's family moves to a new house, "
    "Woody and Buzz must escape the clutches of maladjusted"
    " neighbor Sid Phillips (Erik von Detten) and reunite "
    "with their boy.",
    "http://www.gstatic.com/tv/thumb/movieposters/17420/p17420_p_v7_ab.jpg",
    "https://www.youtube.com/watch?v=KYz2wyBy3kc")

mad_max = media.Movies(
    "Mad Max", "Years after the collapse of civilization, the "
    "tyrannical Immortan Joe enslaves apocalypse survivors "
    "inside the desert fortress the Citadel. When the "
    "warrior Imperator Furiosa (Charlize Theron) leads the "
    "despot's five wives in a daring escape, she forges an "
    "alliance with Max Rockatansky (Tom Hardy), a loner and "
    "former captive. Fortified in the massive, armored truck"
    " the War Rig, they try to outrun the ruthless warlord "
    "and his henchmen in a deadly high-speed chase through "
    "the Wasteland.",
    "http://t0.gstatic.com/images?q=tbn:ANd9GcQuK41mExh1Qv3kbXoxohWYGlcstOQ6zEnnNdSI2BGIKywQwgRI",
    "https://www.youtube.com/watch?v=YWNWi-ZWL3c")
Exemplo n.º 14
0
import fresh_tomatoes
import media

# create movie objects using the corresponding movie names

matrix_movie_index = media.Movies().get_tmdb_movie_index("The Matrix")
matrix = media.Movies().populate_movies_info(matrix_movie_index)

la_confidential_movie_index = media.Movies().get_tmdb_movie_index(
    "LA Confidential")  # NOQA
la_confidential = media.Movies().populate_movies_info(
    la_confidential_movie_index)  # NOQA

dark_knight_rises_movie_index = media.Movies().get_tmdb_movie_index(
    "The Dark Knight Rises")  # NOQA
dark_knight_rises = media.Movies().populate_movies_info(
    dark_knight_rises_movie_index)  # NOQA

intouchables_redemption_movie_index = media.Movies().get_tmdb_movie_index(
    "The Intouchables")  # NOQA
intouchables = media.Movies().populate_movies_info(
    intouchables_redemption_movie_index)  # NOQA

inside_out_movie_index = media.Movies().get_tmdb_movie_index("Inside Out")
inside_out = media.Movies().populate_movies_info(inside_out_movie_index)

shawshank_redemption_movie_index = media.Movies().get_tmdb_movie_index(
    "Shawshank Redemption")  # NOQA
shawshank_redemption = media.Movies().populate_movies_info(
    shawshank_redemption_movie_index)  # NOQA
# -*- coding: utf-8 -*-
import fresh_tomatoes
import media

# Create movie objects
the_phantom_menace = media.Movies(
    "Star Wars: Episode I – The Phantom Menace",
    "Star Wars: Episode I – The Phantom Menace is a 1999 American epic space opera film written and directed by George Lucas, produced by Lucasfilm and distributed by 20th Century Fox.",
    "http://t0.gstatic.com/images?q=tbn:ANd9GcSb2JIB-OTEmF4VxKWNaXzWi8QwxhMTIG4YsqgnyTrfl1WfEqvy",
    "https://www.youtube.com/watch?v=0MTp807E7_k")

attack_of_the_clones = media.Movies(
    "Star Wars: Episode II – Attack of the Clones",
    "Star Wars: Episode II – Attack of the Clones is a 2002 American epic space opera film directed by George Lucas and written by Lucas and Jonathan Hales.",
    "http://t3.gstatic.com/images?q=tbn:ANd9GcS_urKXRdNkSND8mvflceI4Lxbn5uUd7xJyydZFXitXstRe03h7",
    "https://www.youtube.com/watch?v=5NWacXGA4nY")

revenge_of_the_sith = media.Movies(
    "Star Wars: Episode III – Revenge of the Sith",
    "Star Wars: Episode III – Revenge of the Sith is a 2005 American epic space opera film written and directed by George Lucas. It is the third installment of the Star Wars prequel trilogy.",
    "http://t0.gstatic.com/images?q=tbn:ANd9GcT7TlfhiJ93841oYulGpyJZ3YULcgzah1CGumaVQuZ3-zXarfai",
    "https://www.youtube.com/watch?v=-lnegsUlzjM")

star_wars = media.Movies(
    "Star Wars",
    "Star Wars is a 1977 American epic space opera film written and directed by George Lucas. The first installment in the Star Wars film series, it stars Mark Hamill, Harrison Ford, Carrie Fisher, Peter Cushing, and Alec Guinness.",
    "http://t3.gstatic.com/images?q=tbn:ANd9GcTqRzbG-zvWPx5khd-1D9st1B7FYEq71Gbd2UdaPnrWPwVvY2PX",
    "https://www.youtube.com/watch?v=H38MpZtujJc")

empire_strikes_back = media.Movies(
    "The Empire Strikes Back",
Exemplo n.º 16
0
avatar = media.Movie(
    "Avatar", "A marine on an alien planet",
    "http://upload.wikimedia.org/wikipedia/id/b/b0/Avatar-Teaser-Poster.jpg",
    "https://www.youtube.com/watch?v=d1_JBMrrYw8")
#print(avatar.storyline)
#avatar.show_trailer()

school_of_rock = media.Movie(
    "School of Rock", "Using rock music to learn",
    "http://upload.wikimedia.org/wikipedia/en/1/11/School_of_Rock_Poster.jpg",
    "htpps://www.youtube.com/watch?v=3PsUJFEBC74")
ratatouille = media.Movie(
    "Ratatouille", "A rat is a chef in Paris",
    "http://upload.wikimedia.org/wikipedia/en/5/50/RatatouillePoster.jpg",
    "htpps://www.youtube.com/watch?v=c3sBBRxDAqk")
midnight_in_paris = media.Movie(
    "Midnight in Paris",
    "http://upload.wikimedia.org/wikipedia/en/9/9f/Midnight_in_Paris_Poster.jpg",
    "htpps://www.youtube.com/watch?v=atLg2wQQxvU")
hunger_games = media.Movies(
    "Hunger Games",
    "http://upload.wikimedia.org/wikipedia/en/4/42/HungerGamesPoster.jpg",
    "htpps://www.youtube.com/watch?v=PbA63a7HObo")

movies = [
    toy_story, avatar, school_of_rock, ratatouille, midnight_in_paris,
    hunger_games
]
fresh_tomatoes.open_movies_page(movies)
import media
import fresh_tomatoes

# Declaring 6 instances of movie class each containing movie title,
# one line movie description, poster image url and movie trailer's youtube url.

toy_story = media.Movies(
    'Toy Story', 'A story of a boy and his toys that come to life.',
    'http://www.impawards.com/1995/posters/toy_'
    'story_ver1_xlg.jpg', 'https://www.youtube.com/watch?v=KYz2wyBy3kc')

avatar = media.Movies('Avatar', 'A marine on an alien planet.',
                      'http://www.impawards.com/2009/posters/avatar_xlg.jpg',
                      'https://www.youtube.com/watch?v=5PSNL1qE6VY')

school_of_rock = media.Movies(
    'School of Rock', 'Using rock mucic to learn.',
    'https://images-na.ssl-images-amazon.com/images'
    '/M/MV5BMTM0OTgzMjg2MF5BMl5BanBnXkFtZTcwMDg5'
    'MTUyMQ@@._V1_.jpg', 'https://www.youtube.com/watch?v=LqEszt5wG9I')

ratatouille = media.Movies(
    'Ratatouille', 'A rat is a chef in Paris.',
    'https://s-media-cache-ak0.pinimg.com/736x/66/f2'
    '/f4/66f2f48e24762592f4e083c556e913cf.jpg',
    'https://www.youtube.com/watch?v=ALUmKa_mpik')

midnight_in_paris = media.Movies(
    'Midnight In Paris', 'Going back in time to meet authors.',
    'https://images-na.ssl-images-amazon.com/'
    'images/I/61uuYEUFw4L._SY450_.jpg',
import fresh_tomatoes

# import fresh_tomatoes from library

import media

# import class

# first object created

Bahubali = media.Movies(
    'Bahubali', 'The ancient kingdom of Mahishmati',
    'https://i.ytimg.com/vi/JS4drCVGIms/maxresdefault.jpg',
    'https://www.youtube.com/watch?v=sw6VKIClRMY')

# second object created

Don = media.Movies(
    'DON',
    'Don 2 is a 2011 Indian action crime thriller film co-written and directed by Farhan Akhtar.',
    'https://upload.wikimedia.org/wikipedia/en/d/d2/Don_2_poster.jpg',
    'https://www.youtube.com/watch?v=_cJRiAfr2PE')

# third object created

Padmavat = media.Movies(
    'PADMAVAT',
    'Padmavat (or Padmawat) is an epic poem written in 1540 by Sufi poet Malik Muhammad Jayasi',
    'https://upload.wikimedia.org/wikipedia/en/7/73/Padmaavat_poster.jpg',
    'https://www.youtube.com/watch?v=8YaF2m7hCx0')
Exemplo n.º 19
0
import fresh_tomatoes
# import fresh_tomatoes class from python library

import media
# imports the self made class movies

# various constructors or instances are created
sanam_teri_kasam = media.Movies(
    "sanam_teri_kasam", "a true love story of a boy and a girl",
    "http://media.glamsham.com/download/poster/images/sanam-teri-kasam/02-sanam-teri-kasam.jpg",
    "https://www.youtube.com/watch?v=1IpBoMWRjm8")

veer_zaara = media.Movies(
    "Veer Zaara", "a love story of two guys from india and pakistan",
    "https://upload.wikimedia.org/wikipedia/en/c/cb/Veerzaara.jpg",
    "https://www.youtube.com/watch?v=sd2bOhJTIlY")

victory = media.Movies(
    "Victory", "a story of a cricketer",
    "https://upload.wikimedia.org/wikipedia/en/1/19/Victory_hindi.jpg",
    "https://www.youtube.com/watch?v=0Ii0fQ9Vydg")

msd = media.Movies(
    "M.S.Dhoni The Untold Story",
    "biopic of the most succesful captain of indian cricket team",
    "https://upload.wikimedia.org/wikipedia/en/3/33/M.S._Dhoni_-_The_Untold_Story_poster.jpg",
    "https://www.youtube.com/watch?v=6L6XqWoS8tw")

ashiqui2 = media.Movies(
    "ashiqui2", "a love story",
    "https://upload.wikimedia.org/wikipedia/en/f/f3/Aashiqui_2_%28Poster%29.jpg",
import fresh_tomatoes
import media

toy_story = media.Movies("Toy Story", 
                         "A story of a boy & his toys that come to life",
                         "https://en.wikipedia.org/wiki/Toy_Story#/media/File:Toy_Story.jpg",
                         "https://www.youtube.com/watch?v=KYz2wyBy3kc")
                         
#print (toy_story.storyline)

avatar = media.Movies("Avatar",
                      "A Marine on an Alien planet",
                      "https://en.wikipedia.org/wiki/Avatar_(2009_film)#/media/File:Avatar-Teaser-Poster.jpg",
                      "https://www.youtube.com/watch?v=cRdxXPV9GNQ")
                      
#print (avatar.storyline)
#avatar.show_trailer()

transformers_5 = media.Movies("Transformers: The Last Knight",
                             "Optimus Prime finds his dead home planet, Cybertron, in which he comes to find he was responsible for its destruction. He finds a way to bring Cybertron back to life, but in order to do so, Optimus needs to find an artifact that is on Earth. ",
                             "https://en.wikipedia.org/wiki/Transformers:_The_Last_Knight#/media/File:Transformers_The_Last_Knight_poster.jpg",
                             "https://www.youtube.com/watch?v=sgnO5fO46pE")
                             
#print (transformers_5 .storyline)
#transformers_5 .show_trailer()

Doctor_strange = media.Movies("Doctor Strange", 
                         "While on a journey of physical and spiritual healing, a brilliant neurosurgeon is drawn into the world of the mystic arts",
                         "http://www.imdb.com/title/tt1211837/mediaviewer/rm3012758016",
                         "https://www.youtube.com/watch?v=HSzx-zryEgM")
                         
import media
import fresh_tomatoes

# List of all the movies found in the webpage:
life_is_beautiful = media.Movies(
    "Life Is Beautiful",
    "Benigni's earnest charm, when not overstepping its bounds into the \
    unnecessarily treacly, offers the possibility of hope in the face of \
    unflinching horror.", "PG-13", "Drama & Commedy", "Roberto Benigni",
    "Roberto Benigni & Vincenzo Cerami", "2 hr. 2 min.",
    "Roberto Benigni as Guido Orefice, Nicoletta Braschi as Dora, Giorgio \
    Cantarini as Giosue, Giustino Durano as Uncle Eliseo",
    "http://www.rottentomatoes.com/m/1084398-life_is_beautiful/reviews/",
    "https://upload.wikimedia.org/wikipedia/en/7/7c/Vitaebella.jpg",
    "https://youtu.be/pAYEQP8gx3w")

black_mass = media.Movies(
    "Black Mass",
    "Black Mass spins a gripping yarn out of its fact-based story -- and \
    leaves audiences with one of Johnny Depp's most compelling performances \
    in years.",
    "R",
    "Drama",
    "Scott Cooper",
    "Mark Mallouk & Jez Butterworth",
    "2 hr. 2 min.",
    "Johnny Depp as Whitey Bulger, Benedict Cumberbatch as William Bulger, \
    Joel Edgerton as John Connolly, Jesse Plemons as Kevin Weeks",
    "http://www.rottentomatoes.com/m/black_mass_2015/reviews/",
    "http://t2.gstatic.com/images?q=tbn:ANd9GcSK3LiV9aI4uMtI91ZJjDM15AazxWB5uKkxV8D04NARj2sJdBOG",  # noqa
    "https://youtu.be/R_F-lVhSfx8")
Exemplo n.º 22
0
import movie_website
import media

# instances of the Movies class
dunkirk = media.Movies(
    "Dunkirk",
    "A harrowing story of survival and resistance in World War II with skill and craft.",
    "images/dunkirk.jpeg", "https://www.youtube.com/watch?v=F-eMt3SrfFU",
    "Action, Drama, History, War", "PG-13")
ny_library = media.Movies("Ex Libris: The New York Public Library",
                          "A story about New York Public Library",
                          "images/ny_library.jpeg",
                          "https://www.youtube.com/watch?v=0UsglJmevFM",
                          "Documentary", "Not Rated")
faces_places = media.Movies(
    "Faces Places", "Director Agnes Varda and photographer "
    "and muralist JR journey through rural France "
    "and form an unlikely friendship.", "images/faces_places.jpeg",
    "https://www.youtube.com/watch?v=KKbjnLpxv70", "Documentary", "PG")
the_florida_project = media.Movies(
    "The Florida Project",
    "A storyline about childhood in shadows of Disney Land",
    "images/the_florida_project.jpg",
    "https://www.youtube.com/watch?v=WwQ-NH1rRT4", "Drama", "Not Rated")
get_out = media.Movies(
    "Get Out", "An exhilaratingly smart and scary freakout "
    "about a black man in a white nightmare, "
    "the laughs come easily and then go in for the kill.",
    "images/get_out.jpg", "https://www.youtube.com/watch?v=YfLSryEaAfw",
    "Mystery/Thriller", "Not Rated")
lady_bird = media.Movies(
import media
import fresh_tomatoes

# Instances of the class Movies, imported from the file media
into_the_wild = media.Movies(
    "Into The Wild",
    "https://resizing.flixster.com/QVAYl1_7N8StUG8JkUo28qdjxDY=/206x305/" +
    "v1.bTsxMTYyMjIxNztqOzE3Njg0OzEyMDA7NzkyOzEwNTY",
    "https://www.youtube.com/watch?v=g7ArZ7VD-QQ")

toy_story = media.Movies(
    "Toy Story",
    "https://img.fstatic.com/p3ICCo1m3Vo2YVgG1ownzV0f-38=/fit-in/290x478/" +
    "smart/https://cdn.fstatic.com/media/movies/covers/2014/06/" +
    "toy-story_t1407.jpg", "https://www.youtube.com/watch?v=KYz2wyBy3kc&t=5s")

transformers = media.Movies(
    "Transformers",
    "http://www.firstshowing.net/img/optimus-poster-big.jpg?x10994",
    "https://www.youtube.com/watch?v=HKi0xnV4ZjM")

the_wrestler = media.Movies(
    "The Wrestler",
    "https://img.fstatic.com/LUPN-Twzy1S6-mHI4o8GmWrWfsM=/fit-in/" +
    "290x478/smart/https://cdn.fstatic.com/media/movies/covers/2012/05/" +
    "99246ed694dab1d32c896bac1b4bf785.jpg",
    "https://www.youtube.com/watch?v=61-GFxjTyV0")

batman = media.Movies(
    "Batman The Dark Knight Rises",
    "https://vignette.wikia.nocookie.net/marvel_dc/images/0/05/" +
Exemplo n.º 24
0
import media
import fresh_tomatoes
"""Dedicated to creating instances, or the individual movies, from the Movie Class 
contained in the media file"""

#Creates the variable for the movie "Her"
her = media.Movies(
    "Her",
    "A lonely writer develops an unlikely relationship with an operating system"
    " designed to meet his every need.",
    "http://www.impawards.com/2013/posters/her_ver2.jpg",
    "https://www.youtube.com/watch?v=Ai1G85FypxQ")

#Creates the variable for the movie "Eternal Sunshine of the Spotless Mind"
eternal_sunshine = media.Movies(
    "Eternal Sunshine of the Spotless Mind",
    "When their relationship turns sour, a couple undergoes a procedure"
    " to have each other erased from their memories. But it is only through"
    " the process of loss that they discover what they had to begin with.",
    "https://cinephilefix.files.wordpress.com/2012/12/600full-eternal-sunshine-of-the-spotless-mind-poster.jpg",
    "https://www.youtube.com/watch?v=GBEke6JixyE")

#Creates the variable for the movie "Fight Club"
fight_club = media.Movies(
    "Fight Club",
    "An insomniac office worker, looking for a way to change his life,"
    " crosses paths with a devil-may-care soap maker, forming an underground"
    " fight club that evolves into something much, much more.",
    "http://screencrush.com/files/2013/10/fightclub1.jpg",
    "https://www.youtube.com/watch?v=zvtUrjfnSnA")
Exemplo n.º 25
0
    output_json = json.loads(output)
    return {
        'Title': output_json['Title'],
        'Storyline': output_json['Plot'],
        'poster_image': output_json['Poster'],
        'rating': output_json['tomatoMeter']
    }
    connection.close()


# This section calls the movies call from media and
# creates instances for each movie

moonlight = media.Movies(
    pull_api_data("Moonlight")['Title'],
    pull_api_data("Moonlight")['Storyline'],
    pull_api_data("Moonlight")['poster_image'],
    "https://www.youtube.com/watch?v=9NJj12tJzqc",
    pull_api_data("Moonlight")['rating'])

la_la_land = media.Movies(
    pull_api_data("La La Land")['Title'],
    pull_api_data("La La Land")['Storyline'],
    pull_api_data("La La Land")['poster_image'],
    "https://www.youtube.com/watch?v=0pdqf4P9MB8",
    pull_api_data("La La Land")['rating'])

elle = media.Movies(
    pull_api_data("Elle")['Title'],
    pull_api_data("Elle")['Storyline'],
    pull_api_data("Elle")['poster_image'],
    "https://www.youtube.com/watch?v=H-iBBgcp7PY",
import fresh_tomatoes  # Imports fresh_tomatoes file
import media  # Imports the media file
""" Class Instances are being
    created for each of the movies """

toy_story = media.Movies(
    "Toy Story",
    "https://upload.wikimedia.org/wikipedia/en/1/13/Toy_Story.jpg",  # NOQA
    "https://www.youtube.com/watch?v=KYz2wyBy3kc")  # NOQA

shawshank_redemption = media.Movies(
    "Shawshank Redemption",
    "https://www.movieposter.com/posters/archive/main/42/MPW-21321",  # NOQA
    "https://www.youtube.com/watch?v=NmzuHjWmXOc")  # NOQA

the_godfather = media.Movies(
    "The Godfather",
    "http://thumbs3.ebaystatic.com/d/l225/m/mvJN4K4VOmRUhIBD7SbuE2w.jpg",  # NOQA
    "https://www.youtube.com/watch?v=5DO-nDW43Ik")  # NOQA

the_dark_knight = media.Movies(
    "The Dark Knight",
    "http://host.trivialbeing.org/up/tdk-jul1-dark-knight-poster-stupidbats.jpg",  # NOQA
    "https://www.youtube.com/watch?v=EXeTwQWrcwY")  # NOQA

inception = media.Movies(
    "Inception",
    "http://cdn.collider.com/wp-content/uploads/Inception-movie-poster-5.jpg",  # NOQA
    "https://www.youtube.com/watch?v=YoHD9XEInc0")  # NOQA

jurassic_park = media.Movies(
Exemplo n.º 27
0
import media
import fresh_tomatoes

# create a movie object from media.py class
toy_story = media.Movies(
    "Toy Story", "A story about a boytoy",
    "https://upload.wikimedia.org/wikipedia/en/1/13/Toy_Story.jpg",
    "https://www.youtube.com/watch?v=KYz2wyBy3kc")

avatar = media.Movies(
    "Avatar", "a marine's psychedelic journey where real and CGI people die",
    "https://upload.wikimedia.org/wikipedia/en/b/b0/Avatar-Teaser-\
Poster.jpg", "https://www.youtube.com/watch?v=5PSNL1qE6VY")

stand_by_me = media.Movies(
    "Stand By Me", "four kids and a dead body",
    "https://upload.wikimedia.org/wikipedia/en/7/74/Stand_\
By_Me_1986_American_Theatrical_Release_Poster.jpg",
    "https://www.youtube.com/watch?v=oYTfYsODWQo")

sea_of_love = media.Movies(
    "Sea of Love", "killer working girl or is she",
    "https://upload.wikimedia.org/wikipedia/en/9/9c/Sea_\
of_love_1989.jpg", "https://www.youtube.com/watch?v=hoQPFMWteQ4")

the_lover = media.Movies(
    "The Lover",
    "poor French girl, rich Vietnamese businessman, an affair, lost \
          love, an eternal poster in every asian room",
    "https://upload.wikimedia.org/wikipedia/en/b/b8/The-Lover\
-poster.jpg", "https://www.youtube.com/watch?v=ObXJvC49_4k")