I'm making an API using Python requests, and HTTP GET is working fine, but I'm having a little bit of trouble with HTTP POST. So, as with a lot of websites, you can read information, but in order to make a post request (such as following a user, or writing a post), you need to have an authenticated session. THIS website, uses google to log in. Normally, I would just pass the username:password into the POST request formdata to log in, but this google thing is pretty wonky (and quite frankly I'm not that experienced). Does anyone have a reference or an example to help me out? ;/
Asked
Active
Viewed 432 times
0
-
Take a look at `selenium`. http://stackoverflow.com/questions/33708821/auto-connect-on-my-gmail-account-with-python-selenium – Ahsanul Haque Aug 18 '16 at 17:44
-
You need to share the url of the site – Padraic Cunningham Aug 18 '16 at 21:47
1 Answers
-2
I do not know about python requests but to send an email its as easy as this
import yagmail
yagmail.SMTP(emailh).send(email, subject, body)
#emailh = your email (just username no @gmail.com)
#email = send to (full email including domain ***@gmail.com or ***@outlook.com)
#subject = subject of the message
#body = body of the message
Even better
emailh = raw_input('Your email: ')
email = raw_input('Send to: ')
subject = raw_input('Subject: ')
body = raw_input('Body: ')
yagmail.SMTP(emailh).send(email, subject, body)
print('Email Sent.')
If this is what you are talking about anyway.
This page might be useful link