parse_diffbot: Parse a 'diffbot_api' object into a dataframe.

Description Usage Arguments Value Examples

View source: R/parse_diffbot.R

Description

Take the results of get_diffbot and parse into dataframe. Optionally include tag data or image data in final frame.

Usage

1
parse_diffbot(diffbot_output, include = NULL)

Arguments

diffbot_output

A object of class diffbot_api.

include

NULL for just the page data, 'images' to include image data or 'tags' to include tags data.

Value

A dataframe. If just the page data this will be a one row dataframe. Otherwise will either have a row for each image or each tag.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
url <- 'http://techcrunch.com/2012/05/31/diffbot-raises-2-million-seed-round-for-web-content-extraction-technology/'
api_key <- '12345'

t <- get_diffbot(url, api_key)

parse_diffbot(t)
parse_diffbot(t, 'tags')

## End(Not run)

mhairi/diffbotr documentation built on May 22, 2019, 8:56 p.m.