safe_html: Safe html scrapping

Description Usage Arguments Details Value Author(s) Examples

View source: R/safe_html.R

Description

Function safe_html tries to download the URL several times.

Usage

1
safe_html(page, time = 60, attempts = 10)

Arguments

page

requested URL

time

sleep interval after each failure

attempts

max number of tries (if there is a problem with connection)

Details

Function safe_html performes 10 (by default) attempts to download the URL and waits 60sec (by default) after each failure

Value

character vector

Author(s)

Przemyslaw Biecek

Examples

1
2
3
4
5
## Not run: 
page <- paste0('http://www.sejm.gov.pl/Sejm7.nsf/',
               'wypowiedz.xsp?posiedzenie=15&dzien=1&wyp=008')
safe_html(page)
## End(Not run)

sejmRP documentation built on May 2, 2019, 5:16 a.m.

Related to safe_html in sejmRP...