Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • Thanks for the suggestion. I tried to pull the cookies from the first "get" request and use them in the "post" request, but didn't work. What I did find, was that my hunch is correct, I printed the cookies after both the "get" and the "post" and that token is in fact different, so I don't know how to make a login happen? I would need whatever the generated token is during the "post" request. Commented Aug 13, 2020 at 14:21
  • Try making a post request with no data, retrieve the cookies and the token, and try again with a post request with the actual data. Commented Aug 13, 2020 at 15:19
  • No dice, same issue as before. I print out the token and cookies from the first "post", and pass those into the second "post" where I print out the source code of that response, and the token is still different. I don't suppose there's a way to use Selenium to login, and then pass that new logged in session to requests to carry out the rest of what I want to do? :P Commented Aug 13, 2020 at 17:45
  • Actually now that I joke about that, I see a number of resources to try, some of which below: stackoverflow.com/questions/42087985/… stackoverflow.com/questions/54398127/… stackoverflow.com/questions/32639014/… Going to try these out first. Thanks!!!! Commented Aug 13, 2020 at 17:52
  • 1
    Selenium should work, considering it is effectively driving a browser. No worries, good luck! Commented Aug 13, 2020 at 20:25