Skip to content

Instantly share code, notes, and snippets.

View tylerritchie's full-sized avatar

Tyler Ritchie tylerritchie

View GitHub Profile
@tylerritchie
tylerritchie / naeb
Last active April 3, 2021 02:35 — forked from Oreotrephes/naeb
require(rvest)
require(httr)
setwd('~/p/species-scrape')
output_file_name<-'output.txt'
error_urls_file_name<-'error_urls.txt'
for(i in 6174:45000){ #or 1, or whatever
url <- paste0("http://naeb.brit.org/uses/",i) #
message("Scraping ", url)
tryCatch({
# RETRY() will default to 3 retries and add some jitter to the retries as well