https://blog.csdn.net/Mrrunsen/article/details/128539594
天气网北京历史天气链接页:https://lishi.tianqi.com/beijing
```c
library(tidyverse)
library(rvest)
```
从网页解析出来 url
```cpp
postfix = read_html("https://lishi.tianqi.com/beijing/index.html") %>%
html_elements("a") %>%
html_attr("href") %>% # 解析网址
str_subset("^/beijing") # 筛选出正确的
urls = str_c("http://lishi.tianqi.com/", postfix)
urls[1:10]
```
2024-05-23 12:11:28
565KB
r语言
1