I am trying to harvest data from this website
http://www.lkcr.cz/seznam-lekaru-426.html (it's in Czech)
I need to go through every possible combination of "Okres"(region) and "Obor"(specialization)
I tried rvest, but it does not seem to find that there is any dropdown list, html_form returns list of length 0.
therefore, as I am still a newbie in R, how can I "ask" the webpage to show me new combination of pages?
thank you
JH
I'd use the following:
in case field order ever changes (plus it's good to get familiar with targeting nodes with CSS selectors and XPath selectors).
You still need to iterate over each pair (you can do that with nested
purrr::map
calls; I personally prbly wldn't useexpand.grid
ortidyr::complete
for this).BUT…
You're going to have issues submitting the form with
rvest
since the site uses javacript to do some data processing before submitting.You should use Chrome and open up Developer Tools to see what actually gets submitted field-wise and prbly switch to using
httr::POST
. If you have trouble with that, you should open up a new question on SO.