parse_next_listpage_url: Parse url of next listpage

Description Usage Arguments Value Examples

Description

Returns the url of the next page of listings, or NA if no more page is available

Usage

1
parse_next_listpage_url(listpagehtml, domain = "https://geizhals.at")

Arguments

listpagehtml

html structure from a single geizhals page listing items in a selected category, as gathered via xml2::read_html() or via a single entry of the list of listing pages resulting from fetch_all_listpages.

domain

Character vector of length one specifying the domain. Defaults to "https://geizhals.at".

Value

Character vector of length 1 with the full url of the next page with product listings, or NA if no more page is available.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
## url of next page:
url_geizhals <- "https://geizhals.at/?cat=acam35"
listpagehtml <- xml2::read_html(url_geizhals)
parse_next_listpage_url(listpagehtml)

## or NA if no next page available:
url_geizhals <- "https://geizhals.at/?cat=acam35&pg=3#productlist"
listpagehtml <- xml2::read_html(url_geizhals)
parse_next_listpage_url(listpagehtml)

## get html from a geizhals.eu page and parse:
url_geizhals <- "https://geizhals.eu/?cat=acam35"
listpagehtml <- xml2::read_html(url_geizhals)
parse_next_listpage_url(listpagehtml, domain = "https://geizhals.eu")

## End(Not run)

ingonader/rgeizhals documentation built on May 29, 2019, 3:05 a.m.