nightshade
nightshade

Reputation: 1

How can I download a file link (with no URL) using R?

There is no actual URL for the link and it redirects to the same page.

https://www.misoenergy.org/planning/generator-interconnection/GI_Queue/gi-interactive-queue/#

is the example link. I'm trying to use nodes to get the single download button.

miso_queue <- 'https://www.misoenergy.org/planning/generator-interconnection/GI_Queue/gi-interactive-queue/#'
destfile<- html_nodes(miso_queue, xpath='#exportButton > div > a > span') 
download.file(miso_queue, destfile)
df <- read.csv('PATH/miso_fileDATE.csv', sep='","', header=TRUE)

Upvotes: 0

Views: 48

Answers (1)

Nad Pat
Nad Pat

Reputation: 3173

If you are trying to download data from Download all to CSV section we can get it from api,

enter image description here

library(jsonlite)
df = fromJSON('https://www.misoenergy.org/api/giqueue/getprojects')

Upvotes: 1

Related Questions