Можете указать почему выходит ошибка обьесните пожалуйста:
import requests
from bs4 import BeautifulSoup as BS
headers = {
"user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36"
}
url = 'https://dashboard.blooket.com/login'
req = requests.get(url, headers)
soup = BS(req.content, 'lxml')
form = soup.find('form')
inputs = form.find_all('input')
two = []
for one in inputs:
ones = one.get('value')
two.append(ones)
print(two)
И ошибка:
Traceback (most recent call last):
File "C:\Users\raziz\OneDrive\Рабочий стол\P.py", line 11, in <module>
inputs = form.find_all('input')
AttributeError: 'NoneType' object has no attribute 'find_all'
[Finished in 3.7s]