Skip to content

Commit

Permalink
Update tjsp_ler_dados_cposg.R
Browse files Browse the repository at this point in the history
  • Loading branch information
jjesusfilho authored Apr 15, 2024
1 parent c1715b9 commit ae7c5ee
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/tjsp_ler_dados_cposg.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ tjsp_ler_dados_cposg <- function(arquivos = NULL, diretorio = ".", wide = TRUE)
xml2::xml_text(trim = T) |>
stringr::str_remove_all("\\D+")

cd_processo_pg <- stringr::str_extract(.x,"(?<=processo_pg_)\\w+?(?=_)")


digital <- resposta |> xml2::xml_find_first("boolean(//*[@id='pbVisualizarAutos'] |//*[@id='linkConsultaSG'])")

situacao <- resposta |> xml2::xml_find_first("//span[@id='situacaoProcesso']") |>
Expand All @@ -51,7 +54,7 @@ tjsp_ler_dados_cposg <- function(arquivos = NULL, diretorio = ".", wide = TRUE)
xml2::xml_find_all("//span[@class='unj-label']/following-sibling::div") |>
xml2::xml_text()

tibble::tibble(processo = processo, cd_processo, processo_pg, digital, situacao, variavel = nomes,
tibble::tibble(processo = processo, cd_processo, processo_pg, cd_processo_pg, digital, situacao, variavel = nomes,
valor = valores)

}, otherwise = NULL))
Expand Down

0 comments on commit ae7c5ee

Please sign in to comment.