開始使用免費開始

對節流函式傳入自訂引數

請在右側的主控台執行下列程式碼:

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()
}       

為什麼它會列印 "Wikipedia" 三次,而不是 "Google"

本練習屬於課程

R 的網頁爬蟲

檢視課程

動手互動練習

將理論付諸實踐,立即體驗我們的互動練習

開始練習