I was developing a new project to kinda move away from the most basic stuff I could do and I decided to look into web scraping. My idea was to use SteamStatus to check Steam's current status and have my script print it. For the first one, I was going with the Steam Store's status, and I've wrote the following code:
import requests
import bs4
res = requests.get('https://www.steamstatus.io/')
res.raise_for_status
SteamStatus = bs4.BeautifulSoup(res.txt, 'html.parser')
type(SteamStatus)
storeStatus = SteamStatus.select('#statustables > div.statustable.left > div > div:nth-child(1) > div.statusrow_status.store-status')
print(str(storeStatus))
With this, I'm getting the following error:
Traceback (most recent call last):
File "C:/Users/a864/PycharmProjects/automation/steam status/webpage.py", line 8, in <module>
SteamStatus = bs4.BeautifulSoup(res.txt, 'html.parser')
AttributeError: 'Response' object has no attribute 'txt'
From what I've searched and found, this would be a problem of outdated versions of the requests module but I've already made sure I have the latest version (2.24.0)