This uses the MementoWeb Time Travel Service to directly retrieve retrieve URL content. You get (slightly augmented by MementoWeb) orignal URL content from at or near the timestamp you specify.
read_memento(url, timestamp = format(Sys.Date(), "%Y"), as = c("text", "raw", "parsed"))
url | URL to retrieve information for |
---|---|
timestamp | timestamp to use when checking for availability.If you don't pass in a
valid R "time-y" object, you will need to ensure the character string you
provide is in a valid subset of |
as | How you want the content returned. One of " |
The specified content type
This can be helpful if you find the resource you need is gone today but still exists in the memory of the internet.
# NOT RUN { library(htmltools) library(rvest) yahoo_old <- read_memento("http://yahoo.com", "2010") html_print(HTML(yahoo_old)) # opens browser pg <- xml2::read_html(yahoo_old) html_nodes(pg, "a.x3-large") %>% html_text() ## Tiger loses one more sponsorship" # }