I already check the copyrights of Brazilian Central Bank, from now on: "BR Central Bank", (link here) and:
The total or partial reproduction of the content of this site is allowed, preserving the integrity of the information and citing the source. It is also authorized to insert links on other websites to the Central Bank of Brazil (BCB) website. However, the BCB reserves the right to change the provision of information on the site as necessary without notice.
Thus, I'm trying to scrape this website: https://www.bcb.gov.br/estabilidadefinanceira/leiautedoc2061e2071/atuais , but I can't understand why I'm not able to do it. Below you'll find what I'm doing. The html when is saved is empty. What am I doing wrong? Can anybody help me please? After this step I'll read the html code and look for new additions from last database.
url_bacen <- "https://www.bcb.gov.br/estabilidadefinanceira/leiautedoc2061e2071/atuais"
file_bacen_2061 <- paste("Y:/Dir_Path/" , "BACEN_2061.html", sep="" )
download.file(url_bacen,file_bacen_2061, method="auto",quiet= FALSE, mode="wb")
Tks for any help,
Felipe
Data is dynamically pulled from API call you can find it network tab when pressing F5 to refresh page i.e. the landing page makes an additional xhr request for info that you are not capturing. If you mimic this request it returns json you can parse for whatever info you want
library(jsonlite)
data <- jsonlite::read_json('https://www.bcb.gov.br/api/servico/sitebcb/leiautes2061')
print(data$conteudo)