Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
ChatBot_A6/Movies.py
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
22 lines (16 sloc)
749 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#This module was written by Rahul Verma and edited slightly by Humza Shahid | |
import requests | |
#http://www.omdbapi.com/?i=tt3896198&apikey=3860d6cd | |
#http://www.omdbapi.com/ | |
def movie_tvSE(Movie_name): # Movie And Tv Shows Search Engine | |
sent = Movie_name.split("'") | |
mylist= sent | |
mylist[0] = mylist[0].replace(' ', '+') | |
request = requests.get("http://www.omdbapi.com/?t=" + mylist[0] +"&apikey=3860d6cd").json() | |
title = "Title: " + request["Title"] | |
years = "Year: " + request["Year"] | |
actors = "Actors: " + request["Actors"] | |
story = "Story: " + request["Plot"] | |
genre = "Genre: " + request["Genre"] | |
ratings = "IMDB ratings: " + request["imdbRating"] | |
return title, years, actors, story, genre, ratings | |