-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.Rhistory
32 lines (32 loc) · 1.07 KB
/
.Rhistory
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
library(tidyverse)
library(tidylog)
library(rvest)
library(RSelenium) # MRAN does not contain, so please try devtools::install_github("ropensci/RSelenium")
library(jsonlite)
library(lubridate)
library(mailR)
library(readxl)
library(XLConnect)
binman::list_versions("chromedriver")
101500/88200
library(RSelenium) # MRAN does not contain, so please try devtools::install_github("ropensci/RSelenium")
# "Selenium server signals port = 1236 is already in use.")
rD <- rsDriver(browser = "chrome", port = 1330L, geckover = NULL,
chromever = "91.0.4472.101", iedrver = NULL,
phantomver = NULL)
remDr <- rD[["client"]]
url_pc <- str_c("https://www.regulations.gov/comment/HHS-OS-2021-0010-", tmp$id[i])
query_date <- ymd("2021-05-08")
first_id <- 31307
last_id <- 31317
# tmp file saves all the metadata as well as raw public comments from webscraping
tmp <- data.frame(
post_date = as.character(query_date),
receive_date = NA,
id = first_id:last_id,
comments_raw = NA,
attachments = NA
)
i = 1
url_pc <- str_c("https://www.regulations.gov/comment/HHS-OS-2021-0010-", tmp$id[i])
remDr$navigate(url_pc)