Authentication issue using requests on aspx site

后端 未结 1 1029
情书的邮戳
情书的邮戳 2021-01-26 02:39

I am trying to use requests (python) to grab some pages from a website that requires me to be logged in. I did inspect the login page to check out the username and password head

相关标签:
1条回答
  • 2021-01-26 03:30

    You need to use strings for the keys, the $ will cause a syntax error if you don't:

      data = {"ctl00$MainContent$txtPassword":password, "ctl00$MainContent$txtEmailID":email}
    

    There are evenvalidation fileds etc.. to be filled in also, follow the logic from this answer to fill them out, all the fields can be seen in chrome tools:

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