已经把VPN调成全局代理了,然而还是连不上外网。。。貌似听说出了这种情况,就还要在R里面更改具体的连接设置。。。有大佬能细说嘛。。。
require(rvest)
#> 载入需要的程辑包:rvest
#> 载入需要的程辑包:xml2
require(reprex)
#> 载入需要的程辑包:reprex
url <- "https://trends.google.com/trends/?geo=US"
site <- read_html(url)
#> Error in open.connection(x, "rb"): Timeout was reached: [trends.google.com] Connection timed out after 10000 milliseconds
sessionInfo()
#> R version 4.0.3 (2020-10-10)
#> Platform: x86_64-w64-mingw32/x64 (64-bit)
#> Running under: Windows 10 x64 (build 18363)
#>
#> Matrix products: default
#>
#> locale:
#> [1] LC_COLLATE=Chinese (Simplified)_China.936
#> [2] LC_CTYPE=Chinese (Simplified)_China.936
#> [3] LC_MONETARY=Chinese (Simplified)_China.936
#> [4] LC_NUMERIC=C
#> [5] LC_TIME=Chinese (Simplified)_China.936
#>
#> attached base packages:
#> [1] stats graphics grDevices utils datasets methods base
#>
#> other attached packages:
#> [1] reprex_1.0.0 rvest_0.3.6 xml2_1.3.2
#>
#> loaded via a namespace (and not attached):
#> [1] rstudioapi_0.13 knitr_1.30 magrittr_2.0.1 R6_2.5.0
#> [5] rlang_0.4.10 httr_1.4.2 stringr_1.4.0 styler_1.3.2
#> [9] highr_0.8 tools_4.0.3 xfun_0.20 htmltools_0.5.1
#> [13] ellipsis_0.3.1 yaml_2.2.1 digest_0.6.27 tibble_3.0.5
#> [17] lifecycle_0.2.0 crayon_1.3.4 purrr_0.3.4 vctrs_0.3.6
#> [21] fs_1.5.0 curl_4.3 glue_1.4.2 evaluate_0.14
#> [25] rmarkdown_2.6 stringi_1.5.3 compiler_4.0.3 pillar_1.4.7
#> [29] backports_1.2.0 pkgconfig_2.0.3
<sup>Created on 2021-04-01 by the reprex package (v1.0.0)</sup>