join_details_to_listpage: Join details to listpage data

Description Usage Arguments Value Examples

Description

Joins the data from the product detail pages to the data from the category pages.

Usage

1
join_details_to_listpage(dat_listpage, dat_detailpage)

Arguments

dat_listpage

A tibble (data.frame) containing all the data from the scraped geizhals category listing pages, with the join column detailpage_url.

dat_detailpage

A tibble (data.frame) containing the data from corresponding detail pages, with the column specifying the url.

Value

A tibble (data.frame) containing both the data from the category pages as well as the corresponding detail page data (or NA if no match is present).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
url_geizhals <- "https://geizhals.at/?cat=acam35"
## fetch html of all listing pages:
listpagehtml_list <- fetch_all_listpages(url_geizhals, max_pages = 2)
## and parse information of these listing pages:
dat_listpage <- parse_all_listpages(listpagehtml_list)
## get all (or some) detailpages:
detailpagehtml_list <- fetch_all_detailpage_html(dat_listpage$detailpage_url,
                                                 max_items = 5)
dat_detailpage <- parse_all_detailpages(detailpagehtml_list)
dat_geizhals <- join_details_to_listpage(dat_listpage,
                                         dat_detailpage)
head(dat_geizhals)

## End(Not run)

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