I’m very new to web scraping and am trying to perform it using R.

I want to recover some public information from an website which requires me to fill a form. I believe I’ve correctly managed to fill the form with the code below, but the response that I get does not contain the table output that I want to download – element “page”.

Could you tell me which sort of code I need to retrieve the table output when sending the form on this website?

Any tips on the direction to follow is highly appreciated.

Thanks a lot in advance

url <- "https://www.tjba.jus.br/registrocivil/consultaPublica/search"

wahis.session <- html_session(url)

filled.form <- html_form(wahis.session)

filled.form[[1]] <- set_values(filled.form[[1]],
                               form_tipoRegistro = 'LC' ,
                               form_cartorioRegistro = '99' )

page <- submit_form(session = wahis.session,
                             form = filled.form[[1]],
                             submit = 'form_search')