My school has a website that students can sign up for classes during a study period and I forget all the time. I'm trying to make a script that logs in and signs up for me. This is what I have:
import requests
payload = {
"username": "",
"pwd": "",
"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.246"
}
with requests.Session() as s:
p = s.post('http://www.bloomingtonsouth.org/plus/login.php', data=payload)
print(p.text)
r = s.get('http://www.bloomingtonsouth.org/plus/student.php')
print(r.text)
The output: "Not Acceptable!
Not Acceptable!
An appropriate representation of the requested resource could not be found on this server. This error was generated by Mod_Security.
Not Acceptable!Not Acceptable!
An appropriate representation of the requested resource could not be found on this server. This error was generated by Mod_Security.
"What am I doing wrong?
Aucun commentaire:
Enregistrer un commentaire