Skip to content

Commit

Permalink
fix #3 (with old download link)
Browse files Browse the repository at this point in the history
  • Loading branch information
fsolt committed Jul 13, 2020
1 parent 862ad9f commit 8392bfc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/icpsrdownload.R
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ icpsr_download <- function(file_id,
url <- paste0("http://www.icpsr.umich.edu/cgi-bin/bob/zipcart2?path=ICPSR&study=", item, "&bundle=all&ds=&dups=yes")

s <- html_session(url)
form <- html_form(s)[[3]]
form <- html_form(s)[[2]]
add_email <- list(name = "email",
type = "text",
value = email,
Expand All @@ -118,7 +118,7 @@ icpsr_download <- function(file_id,
suppressMessages(agree_terms <- submit_form(s, form) %>%
jump_to(url))
suppressMessages(output <- submit_form(agree_terms,
html_form(agree_terms)[[3]]) %>%
html_form(agree_terms)[[2]]) %>%
follow_link("download your files here"))

file_name <- paste0("ICPSR_", sprintf("%05d", item), ".zip")
Expand Down

0 comments on commit 8392bfc

Please sign in to comment.