How to load a BeautifulSoup page parser?
beautifulsoup, python, python-3.x, request
Solution
You need to pass the actual html not the request :
soup = bs4.BeautifulSoup(html.text)
Problem
help please download the specified page and find her element with id =''login ". necessarily need to use for the query module request ``` import pprint import requests import bs4 url = 'http://forum.saransk.ru/' html = requests.get(url) #print(html.text) soup = bs4.BeautifulSoup(html) loginForm = soup.find('form', {'id': 'login'}) pprint.pprint(loginForm) ``` error message: Traceback (most recent call last): File "C:\VINT\OPENSERVER\OpenServer\domains\localhost\python\parse_html\4_auth\q.py", line 9, in soup = bs4.BeautifulSoup(html) File "C:\Python33\lib\site-packages\bs4__init__.py", line 162, in init elif len(markup) <= 256: TypeError: object of type 'Response' has no len()