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)