Вот код, проблема в том, что он не хочет показывать текст, почему?
import requests
from bs4 import BeautifulSoup
url = requests.get('http://almetpt.ru/2020/site/schedule/group/835')
print(url.status_code)
soup = BeautifulSoup(url.text, "html.parser")
allNews = soup.findAll('div', class_='container')
print(allNews.text)
Traceback (most recent call last):
File "D:/programmer/PyCharm Community Edition 2020.2.3/bot_parser.py", line 10, in <module>
print(allNews.text)
File "D:\programmer\PyCharm Community Edition 2020.2.3\venv\lib\site-packages\bs4\element.py", line 2253, in __getattr__
raise AttributeError(
AttributeError: ResultSet object has no attribute 'text'. You're probably treating a list of elements like a single element. Did you call find_all() when you meant to call find()?
вот ошибка