예제 #1
0
              or sy.findSyns(user_input, "biography") == 0):
            # Gets bio of an actor
            # bio {any actor name}
            if 'person' in locals():
                p.giveBio(person['name'], 4)
            elif person_name != '':
                p.giveBio(person_name, 4)
            else:
                print("IMDBot: I\'m not sure who you\'re asking about.")
            print("IMDBot: What else would you like to know?")

        elif ((('check' and 'if' and 'in') in user_input)
              and (person_name != '') and (movie_name != '')):
            #Check if a {actor} is in {movie}
            if 'movie' in locals():
                p.checker(userName, person_name, movie, movie_name)
            else:
                p.checker(userName, person_name, '', movie_name)
            print('IMDBot: What else can I help you with?')

        elif (('production' and 'company') in user_input
              or sy.findSyns(user_input, 'companies') == 0):
            print(
                "IMDBot: Okay, let me search the production companies for you!"
            )  # buffer for searching companies
            company = c.findCompany(
                movie)  # list the production companies of the movie asked
            print(
                'IMDBot: What else would you like to know about the company? :)'
            )
예제 #2
0
     print("IMDBOT: What else would you like to know?")
 elif (user_input.lower().__contains__('latest movie')):
     #Search for a latest movie by an actor
     #Example, what is the latest movie {any actor name} has worked in
     person = user_input.split("movie ")[1]
     person = person.split("has")[0]
     print("IMDBOT: Hmm... let me think...")
     p.giveBio(person, 3)
     print("IMDBOT: What else would you like to know?")
 elif (user_input.lower().__contains__('check')):
     #Check if a {any actor name} is in {any movie name}
     # Example, check if {any actor name} is in {any movie name}
     person = user_input.split("if")[1]
     person = person.split('is')[0]
     movie = user_input.split("in")[1]
     p.checker(person, movie)
     print("IMDBOT: What else would you like to know?")
 elif (user_input.lower().__contains__('bio')):
     #Gets bio of an actor
     # bio {any actor name}
     person = user_input.split("bio ")[1]
     p.giveBio(person, 4)
     print("IMDBOT: What else would you like to know?")
 elif (user_input.lower().__contains__('production company')
       or user_input.lower().__contains__('production companies')):
     print(
         "IMDBot: Okay, let me search the production companies for you!"
     )  # buffer for searching companies
     company = c.findCompany(
         movie)  # list the production companies of the movie asked
     print(