Closed bhavneetattri1995 closed 5 years ago
While downloading the CSV file which required login before downloading in R language. This is done first log in to the page and then download the file with package httr and rvest. following is my script
url <- "https://lgloz050.lss.emc.com:58443/APG/" dn_url <- "https://lgloz050.lss.emc.com:58443/APG/lookup/Report%20Library/Amazon%20S3/Inventory/Accounts/report.csv" session <- html_session(url) form <- html_form(session)[[1]] fl_fm <- set_values(form, j_username = "*****", j_password = "********") main_page <- submit_form(session, fl_fm) downlaod <- jump_to(main_page,cfig$dn_url) writeBin(downlaod$response$content, basename(cfig$dn_url))
on execution the script, it generate an error as below:
Error in request(method = y$method %||% x$method, url = y$url %||% x$url, : length(url) == 1 is not TRUE.
what is mistake in this script. Suggest me
While downloading the CSV file which required login before downloading in R language. This is done first log in to the page and then download the file with package httr and rvest. following is my script
on execution the script, it generate an error as below:
what is mistake in this script. Suggest me