Login on website using jsoup

后端 未结 1 670
面向向阳花
面向向阳花 2021-01-29 06:15

On this website, you can enter your student-card-number, and then it will display how much money is left on that card. I want to obtain the information using JSOUP. This is my c

相关标签:
1条回答
  • 2021-01-29 06:38

    You should use both get and post:
    First you have to send get request with no parameters to the URL - http://kortladdning3.chalmerskonferens.se/Default.aspx. The server replies with some cookies, and two values you'll use later - __VIEWSTATE and __EVENTVALIDATION. These values vary from request to request, so you can't use hard-coded values like you did.
    After extracting these values, send post request, with the same fields you do now.
    You can look at a very similar procedure here - Problems submitting a login form with Jsoup

    0 讨论(0)
提交回复
热议问题