Помогите исправить ошибку с библиотекой BeautifulSoup

import requests
from bs4 import BeautifulSoup

url = 'https://www.kinopoisk.ru/lists/movies/top250/'
r = requests.get(url)
soup = BeautifulSoup(r.text, 'lxml')
link = soup.find('div', class_='styles_root__ti07r').find('a', class_='styles_poster__gJgwz styles_root__wgbNq').get('href')

Выдаёт ошибку:

link = soup.find('div', class_='styles_root__ti07r').find('a', class_='styles_poster__gJgwz styles_root__wgbNq').get('href')
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'find'

Ответы (0 шт):