get_ECOS_page: Use phantomjs to get a page from ECOS

Description Usage Arguments Details Value Examples

Description

Use phantomjs to get a page from ECOS

Usage

1

Arguments

url

The URL of the species' ECOS page

file

The path to which the HTML will be written

Details

A significant amount of content on ECOS pages is rendered from javascript functions, and 'standard' scraping tools like read_html miss those components. phantomjs provides a function (phantomjs) to render the full page, complete with javascript elements, and write them to file.

This function should be preferred over get_species_page in most cases even though it is slightly slower with the scrape because it will get certain tables (e.g., the petitions table) and content like the species' range map data.

Value

The status of the phantomjs scrape (1 or 0) or NULL if an HTTP error

Examples

1
2
3
4
## Not run: 
   An example, not run

## End(Not run)

jacob-ogre/ecosscraper documentation built on May 18, 2019, 8 a.m.