# p$close() library(curlR) library(Ipaper) library(data.table) login_CUG <- function(user, pwd) { p <- getOption("curlR.browser") p$navigate("http://xyfw.cug.edu.cn/tp_up/view?m=up#act=portal/viewhome") querySelector(".qq") %>% ele_click() login_qq.pwd(p, user, pwd) }
port <- 4445 kill_selenium(port) p <- init_selenium(port, browserName = "chrome") login_CUG("1090080916", "****") go(p, "http://one.cug.edu.cn/tp_up/view?m=up#act=up/appstore/applist") go(p, "http://202.114.207.126/jwglxt/xsxkjk/xsxkcx_cxXsxkIndex.html?gnmkdm=N255005&layout=default&su=049140") d <- read_xlsx("C:/Users/kongdd/Downloads/文件1636349537766.xlsx") # http://202.114.207.126/jwglxt/xtgl/photo_cxXszp.html?xh_id=20191000749&zplx=rxhzp # http://202.114.207.126/jwglxt/xtgl/photo_cxXszp.html?xh_id=20191000829&zplx=rxhzp # d <- fread("examples/mingdan.csv", encoding = "UTF-8") foreach(i = 1:nrow(d), icount()) %do% { id <- d$id[i] name <- d$name[i] url <- glue("http://202.114.207.126/jwglxt/xtgl/photo_cxXszp.html?xh_id={id}&zplx=rxhzp") outfile <- glue("{id}_{name}.jpg") # download.file(url, outfile, mode = "wb") go(p, url) Sys.sleep(2) file.rename("C:/Users/kongdd/Downloads/photo_cxXszp.jpg", outfile) } go(p, url)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.