parse_listprice: Parse price from listing page

Description Usage Arguments Value Examples

Description

Returns the listed price for a product in a single geizhals html page of a category listing page. The order might not correspond to the order listed on the webpage, but it is the same order in all related functions.

Usage

1
parse_listprice(listpagehtml)

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.

Value

A numeric vector containing the price in the same order of the products as appearing in the listing page returned from parse_product_names.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
## get html of a geizhals category page via read_html:
url_geizhals <- "https://geizhals.at/?cat=acam35"
listpagehtml <- xml2::read_html(url_geizhals)
parse_listprice(listpagehtml)

## get html of multiple geizhals category listing pages:
listpagehtml_list <- fetch_all_listpages(url_geizhals, max_pages = 2)
parse_listprice(listpagehtml_list[[1]])

## End(Not run)

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