Answer the question
In order to leave comments, you need to log in
I am making code for parsing sites and it gives me an error name 'html' is not defined how can I fix it?
from bs4.builder import HTML
import requests
import lxml
from bs4 import BeautifulSoup
from random import choice
responce = requests.get('https://www.rambler.ru/').content
HTML = BeautifulSoup(responce,'lxml')
fact = choice(html.find_all('h3', class_ = '_3ZkM'))
print(fact)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question