In the video, the author explains how to use the REST API to access a movie database, how to handle an exception in a try block, and how to solve problems 4 and 5 of the CPS141 PS9 exam.
00:00:00 In this video, the author shows how to use the REST API to access a movie database. First, they demonstrate how to import requests into a JSON file. Then, they show how to use the REST API to access the website. The author demonstrates how to successfully retrieve a title and API key for a movie.
00:05:00 In this video, the author explains how to handle an exception in a try block. If an exception is triggered, the author suggests checking the response to see if it is false, which will indicate that the request was not successful. If the request was not successful, the author recommends returning false to indicate that the data was not valid.
00:10:00 In this video, a tutorial is given on how to solve problems involving movies, specifically problems 4 and 5 of the CPS141 PS9 course. The first function is defined, which takes in a list of movies and returns a dictionary of their titles. If a movie is not valid, it is not added to the list. Problems 4 and 5 are similar, and the only difference is that in problem 4, the user only wants valid movies, and in problem 5, the user wants to sort movies based on their IMDB rating. The second function is defined, which takes in a list of movies and sorts them based on their rating. Finally, an if statement is added to check if the movie is valid before appending it to the list.
00:15:00 In this video, the creators explain how to solve problem 5 of the CPS141 PS9 exam. First, they open the text file called "field movies." Next, they read the strings contained within, and convert them into a Python dictionary. Finally, they use the JSON loads method to convert the dictionary into a JSON string, and parse it into a Python object.
00:20:00 The video demonstrates how to create and use a variable to store the title of a movie, and how to check if the title is already in the variable. If the title is not in the variable, the video demonstrates how to add the title to the variable. Finally, the video shows how to use the variable to store the information about a movie watched.
00:25:00 This video shows how to determine whether a cell is in a list or not. If it is in the list, it will return true; otherwise, it will return false.