Im trying to webscrape some information from my school page, but im having hard time to get past login. I know there are similar threeds, i have spend whole day reading, but cannot make it work.
This is program im using (User name and password were changed):
import requests
payload = {'ctl00$cphmain$Loginname': 'name', 'ctl00$cphmain$TextBoxHeslo': 'password'}
page = requests.post('http://gymnaziumbma.no-ip.org:81/login.aspx', payload)
open_page = requests.get("http://gymnaziumbma.no-ip.org:81/prehled.aspx?s=44&c=prub")
#Check content
if page.text == open_page.text:
print("Same page")
else:
print(open_page.text)
print("Different page!")
Can you tell me, what im doing wrong? Am i missing some parameter? Is requests good metod for this? I was trying robobrowser and BeautifulSoup, but doesnt work either. I bet im missing something really trivial.
Im using Python 3.5