Как исправить ошибку 'NoneType' object is not iterable
Ошибка:
File "C:/Users/evrik/AppData/Local/Programs/Python/Python38-32/`325789.py", line 22, in get_content
for item in items:
TypeError: 'NoneType' object is not iterable
Код:
def get_content(html):
soup = BeautifulSoup(html, 'html.parser')
items = soup.find(class_='raspis')
names = []
for item in items:
names.append({
'title': item.find('div', class_='shtitle')
})