My goal is to extract some information from the site every now and then automatically. To be able to do that I have to be logged in and I can't find a way to pass my credentials to the website.
import requests
EMAIL = 'randomemail@gmail.com'
PASSWORD = 'randompassword'
URL = 'https://www.myanonamouse.net'
def main():
session = requests.Session()
login_data = {
'email': EMAIL,
'password': PASSWORD,
'submit': 'Log in!',
}
r = session.post(URL, data=login_data)
print(r.text)
main()
I need some help fixing this part, but I would also like to know what I did wrong and how I can improve it (stay logged in for the entire session). Thanks in advance.