Answer the question
In order to leave comments, you need to log in
Why did the page stop parsing?
Vkontakte has a page for searching people by last name:
https://vk.com/people/Иванов
I wrote a script that once received a page with several people found at this address (that is, I worked it out without problems). But for some time now this script has stopped working. The reason is that html is now returned, which contains the phrase in the markup:
<div id="no_results" class="no_rows">Ваш запрос не дал результатов<br> Возможно, Вы искали <a hr
import requests
headers = {
'User-agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:50.0)'
}
response = requests.get('https://vk.com/people/Козлов', headers=headers, proxies={"http":"http://10.10.1.10:3128"})
if response.status_code == 200:
print('ok', response.text)
else:
print('fail')
Answer the question
In order to leave comments, you need to log in
1. the request is for https, but the proxy is for http
2. the proxy is "local", its external ip can be the same as yours
, and certainly not on VKontakte to learn how to bypass blocking
My script worked and returned a result with a list of last names.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question