How to implement in Python authorization on the page, for example, mail, to find out how many new letters in the box?
2 answers
If this is a web page, see which data transfer method the authorization form uses (most likely, POST), send the data with an HTTP request via urllib2, with the received HTML do what you want.
But in general, if you need to look at the mail, connect via POP3 / IMAP to the box, and authorization for the sake of letters via HTTP is like glands through the wrong place :)
|
I saw this on YouTube, but not for soap. ps I by the way can not do this.
url = 'http://сайт.ру/логин.пхп' #к примеру def auth((): session = requests.Session() payload = { 'email':'////', 'password':'/////' } r = requests.post(url, data=payload)
|