POST form while in an rselenium session to grab json

52 Views Asked by At

I'm able to run an rselenium remote driver to grab data from a private (password) secured website. This requires finding the right xpath or css selector and doing a lot of text cleaning / grep'ing of text since the data is not in table format. In looking at the network tab recently, I found a Fetch/XHR document that has the json file with all the source data. However, after many hours of searching and reading up on how to make a POST while in an rselenium session (to grab the json file) I'm coming up empty. Also, I'm unable to use rvest::session because I keep getting a Unknown http status code: 464 code when I try to initiate a session and this is why I'm resorting to using rselenium. Unfortunately, because this is a private website, I'm not able to share the address or any other information besides a screenshot of the network tab payload. I'm hoping this is enough information for someone to start pointing me in the right direction.

My question is: once I'm successfully logged in to a session via rselenium web driver, how can I make a POST to grab a json file with the given request headers?

Source page Network tab

0

There are 0 best solutions below