Closed potterzot closed 2 years ago
Historically the base table would not load because it was rendered in java(script) after the page was send. In short, when using e.g. httr
roughly the default for doing things download related these days, it would not work as the page would be flagged as loaded even before all content was there. Hence, the wdman setup which emulates browser usage, and which waits for all components to load.
A quick test shows that either httr
has been updated to account for this, or the snotel page has changed (I guess the former). In any case, I'll implement this later tonight.
# test transfer
library(tidyverse)
library(httr)
library(rvest)
df <- httr::GET("https://wcc.sc.egov.usda.gov/nwcc/yearcount?network=sntl&counttype=listwithdiscontinued") %>%
rvest::read_html() %>%
rvest::html_table() %>%
data.frame()
Fixed: https://github.com/bluegreen-labs/snotelr/commit/c00b8aaf6afe045162ee92e3b81fa9fd4ebc8651
Install from github for now
Some users (e.g. myself) don't have sufficient privileges to open a port with
RSelenium
as done here. Would there be interest in an alternative caching method that doesn't require thememoise
andwdman
packages but rather saves the site metadata as a tempfile? I'm not familiar withmemoise
but an alternative that doesn't require opening a port would be helpful.