Created
November 15, 2023 09:31
-
-
Save mdwitr0/0519de4978d1ee7c40b32dbf759689c6 to your computer and use it in GitHub Desktop.
Поиск фильма по названию
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
import requests | |
headers = {"X-API-KEY": "...TOKEN"} | |
def get_movies_by_name(): | |
query = 'Аватар путь воды' | |
params = { | |
'query': query | |
} | |
response = requests.get( | |
'https://api.kinopoisk.dev/v1.4/movie/search', | |
headers=headers, | |
params=params | |
) | |
return response.json() | |
movies = get_movies_by_name() | |
print(movies) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment