Created
December 18, 2019 12:25
-
-
Save spceaza/358812559c78c1893f8b8c817dd71cd0 to your computer and use it in GitHub Desktop.
República Checa 1 año Datos Históricos Rendimiento de Bonos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#install.packages( "XML" ) | |
#install.packages( "httr" ) | |
url_data = "https://es.investing.com/instruments/HistoricalDataAjax" | |
params = list() | |
params$curr_id = 29248 | |
params$smlID = 205189 | |
params$header = "República+Checa+1+año+Datos+Históricos+Rendimiento+de+Bonos" | |
params$st_date = "18/11/2019" | |
params$end_date = "18/12/2019" | |
params$interval_sec = "Daily" | |
params$sort_col = "date" | |
params$sort_ord = "DESC" | |
params$action = "historical_data" | |
headers_vector = vector() | |
headers_vector["X-Requested-With"] = "XMLHttpRequest" | |
headers_vector["Content-Type"] = "application/x-www-form-urlencoded" | |
response = httr::POST( url_data, body = params, encode = "form", verbose(), config = add_headers( .headers = headers_vector ) ) | |
table_source = content( response, "text" ) | |
tables = XML::readHTMLTable( table_source ) | |
print( tables ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment