Answer the question
In order to leave comments, you need to log in
How to parse responses from Mail.ru in Python?
You need to write a script that will search for answers from Mail.ru, select a random one from the first, then go to this question and select a random answer. Sounds easy. But the problem arose at the very beginning. I do it like this:
import requests
from bs4 import BeautifulSoup as BS
url = 'https://otvet.mail.ru/search/'
response = requests.get(f'{url}мой вопрос')
soup = BS(response.text, 'html.parser')
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