Answer the question
In order to leave comments, you need to log in
How to log in to a website using request python?
Good afternoon everyone!
I want to authorize via request python here https://oauth.vk.com/authorize?client_id=2685278&s... (this is a site to get my VK key)
I wrote the code, enters only the login, does not enter the password, although the name is in the source code the same as mine 'pass' what could be the problem?
import requests
datas = {
'email':'def',
'pass':'def'
}
login = '1111111111'
password = '11111111111'
datas['email'] = login
datas['pass'] = password
url = 'https://oauth.vk.com/authorize?client_id=2685278&scope=1073737727&redirect_uri=https://oauth.vk.com/blank.html&display=page&response_type=token&revoke=1'
s = requests.Session()
loging = s.post(url, data = datas)
f = open('result.txt', 'w')
f.write(loging.text)
f.close()
#Вход успешно воспроизведен и мы сохраняем страницу в html файл. Я открываю этот html, но там висит так же на странице авторизации только с заполненным логином
with open("vv.html","w",encoding="utf-8") as f:
f.write(loging.text)
Answer the question
In order to leave comments, you need to log in
one.
I want to log in via request python here
enters only login, does not enter password
although name in source code
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question