priority_match: Priority match

Description Usage Arguments Value Examples

View source: R/priority_match.R

Description

priority_match This is a scraping function used to sequentially check for the presence of keywords in an links in an html document. If the keyword of interest is found, then the function returns the link within which the keyword was found, otherwise it continues to search for the next keyword in the vector.

Usage

1

Arguments

x

x A parsed html document. Nominally this will be the output XML::htmlParse(readr::read_Lines(x))..

patterns

patterns A character vector containing keywords in the the order in which they should be searched for.

Value

If a match is found, the link string is returned. If no match is found then NA is returned.

Examples

1
2
3
#library(scrapeML)

#get_url("www.google.com",tempfile())

ivyleavedtoadflax/scrapeML documentation built on May 18, 2019, 7:14 a.m.