Help for project

I’m working on this project for a course and I have to write some functions. The request of the first function is the following: Define a function, called get_movies_from_tastedive . It should take one input parameter, a string that is the name of a movie or music artist. The function should return the 5 TasteDive results that are associated with that string; be sure to only get movies, not other kinds of media. It will be a python dictionary with just one key, ‘Similar’.

The function actually works, and even the rest of the project (the uses it) is working fine. However, I get the error “Error: TypeError: list indices must be integers, not str”.

I have tried everything I can think of and for hours. Can you help me?

This is the print of res.text:
{“Similar”: {“Info”: [{“Name”: “Black Panther”, “Type”: “movie”}], “Results”: [{“Name”: “Captain Marvel”, “Type”: “movie”}, {“Name”: “Avengers: Infinity War”, “Type”: “movie”}, {“Name”: “Ant-Man And The Wasp”, “Type”: “movie”}, {“Name”: “The Fate Of The Furious”, “Type”: “movie”}, {“Name”: “Deadpool 2”, “Type”: “movie”}]}}

The requests_with_caching.get is basically the same as request.get, it just looks if the data has been saved in the cache and, if it was, it takes it from there.

SOLVED: the code was not wrong, simply the task is poorly written (in my opinion). You are supposed to return the entire information from the get basically.