为限速函数自定义参数
请在右侧控制台执行以下代码:
throttled_read_html <- slowly(~ read_html("https://wikipedia.org"),
rate = rate_delay(0.5))
for(i in c(1, 2, 3)){
throttled_read_html("https://google.com") %>%
html_element("title") %>%
html_text() %>%
print()
}
为什么它打印了 3 次 "Wikipedia",而不是 "Google"?
本练习是课程的一部分
