Sorry in advance if I am going about this completely wrong, as I am very new to jSoup.
I am trying to login to my school's grade website in order scrape grade data from it and display it in a program. The link to the login portal is "https://portal.mcpsmd.org/public/" however the page I am trying to scrape data from is located at "https://portal.mcpsmd.org/guardian/home.html#/termGrades".
This is the code I am trying to use, which I got from another similar Stack Overflow Question:
String url = "https://portal.mcpsmd.org/guardian/home.html#/termGrades";
Document doc =
Jsoup.connect("https://portal.mcpsmd.org/guardian/home.html#/termGrades")
.data("fieldAccount","MY_SCHOOL_ID")
.data("fieldPassword","MY_SCHOOL_PASSWORD")
.userAgent("Mozilla")
.post();
System.out.println(doc);
Currently when I run this program it prints out data from the login page, instead of the term grades page. I guess what I am trying to ask is what is the best way I can scrape data from a website that requires me to login first. I am currently trying to build an android app that can scrape data from my school's website, but I dont know how to get around this login screen.