archive_available: Does the Internet Archive have a URL cached?

Description Usage Arguments Details Value References Examples

View source: R/available.r

Description

This performs a simple test to see if a given url is archived and currenlty accessible in the Wayback Machine.

Usage

1

Arguments

url

URL to retrieve information for

timestamp

(optional) timestamp to use when checking for availability. If not specified, the most recenty available capture in Wayback is returned. 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 YYYYMMDDhhmmss.

Details

If a resource is found, the returned data frame will have available set to TRUE and the closest_url, timestamp and status fields populated. If the resource is not found, the url field will be populated along with a status field that has a value of "404".

Value

data frame

References

https://archive.org/help/wayback_api.php

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
rproj_avail <- archive_available("https://www.r-project.org/")

str(rproj_avail)
## Classes <e2><80><98>tbl_df<e2><80><99>, <e2><80><98>tbl<e2><80><99> and 'data.frame':	1 obs. of  5 variables:
##  $ url       : chr "https://www.r-project.org/"
##  $ available : logi TRUE
##  $ closet_url: chr "http://web.archive.org/web/20170830061210/http://www.r-project.org/"
##  $ timestamp : POSIXct, format: "2017-08-30"
##  $ status    : chr "200"

## End(Not run)

hrbrmstr/wayback documentation built on May 17, 2019, 5:53 p.m.