return [h.text for h in art.select('a')]
AttributeError: 'NoneType' object has no attribute 'select'
import requests
from bs4 import BeautifulSoup
from aiogram import Dispatcher, executor, types, Bot
from config import API_token
import random
bot = Bot(API_token)
dp = Dispatcher(bot)
def pars_game():
url = requests.get('https://stopgame.ru/review/izumitelno')
soup = BeautifulSoup(url.text, 'lxml')
art = soup.find('div', class_='_card__content_givrd_398')
return [h.text for h in art.select('a')]
list_news = pars_game()
random.shuffle(list_news)