K
K
kodbiprog2021-07-26 13:49:33
Python
kodbiprog, 2021-07-26 13:49:33

python requests problem?

I want to login to https://mail.rambler.ru/ using python, but when i enter correct email and password and save result.txt, it gives error 404

import requests
datas = {
'login':'def' ,
'password':'def'
}
login = input('Enter email: ')
passwd = input('Password: ')
datas['login'] = login
datas['password'] = passwd
url = ' https:/ /mail.rambler.ru '
s = requests.Session()
logging = s.post(url, data = datas)
f = open('result.txt','w+')
f.write(logging.text)
f. close()

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2021-07-26
@dmtrrr

404 means that the url is invalid.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question