我正在尝试为我的学校项目解析站点,但是当我尝试将数据合并到表中时出了点问题。您对下面的问题有任何想法吗?您知道网络剪贴的任何好教程吗?
提前谢谢!
scrape_write_table <- function(url,PopCornNews){
list_of_pages <- str_c(url, '?page=', 1:100)
list_of_pages %>%
map(get_data_from_url, PopCornNews) %>%
bind_rows() %>%
write_tsv(str_c(PopCornNews,'.tsv'))
}
scrape_write_table(url, 'PopCornNews')
gdr_tbl <- read_tsv('PopCornNews.tsv')
tail(gdr_tbl, 5)```
Output:
> scrape_write_table <- function(url,PopCornNews){
+
+ list_of_pages <- str_c(url, '?page=', 1:100)
+ list_of_pages %>%
+ map(get_data_from_url, PopCornNews) %>%
+ bind_rows() %>%
+ write_tsv(str_c(PopCornNews,'.tsv'))
+ }
> scrape_write_table(url, 'PopCornNews')
**Error in stream$next_ident() : Expected ident, got <DELIM '.' at 2>**