def response_to_movies(self, response): array = [] for movie in response['results']: try: array.append(Movie.from_dict(movie)) except Exception as e: self.errors+=1 print(e) return array
def test(): search = tmdb.Discover() response = search.movie(sort_by="release_date.desc", year=2020, page=1) movie = Movie.from_dict(response['results'][0]) print(str(movie))