I am new to Python and I'm trying to log into a website using the Requests module and print out some of my account information. See code below :
import requests
username = 'myusername'
password = 'mypassword'
URL = 'https://www.mmoga.com/login.php'
payload = {'email_address': username, 'password': password}
session = requests.session()
r = requests.post(URL, data=payload)
account = session.get('https://www.mmoga.com/shopping_cart.php')
print account.content
Do I also have to add headers to the requests.post?
When I look at the html source I am seeing
<div class="boxHeading">
<a href="mmoga.com/login.php"; title="- My Account -">- My Account -</a>
</div>
however I should be seeing
<div class="boxHeading">
<a href="mmoga.com/account.php"; title="- My Account -">- My Account -</a>
</div>