楼主: thunderhit
2621 1

[实际应用] R语言运行CAfile: ? CApath: none这是什么鬼 [推广有奖]

  • 1关注
  • 0粉丝

高中生

30%

还不是VIP/贵宾

-

威望
0
论坛币
764 个
通用积分
0.6000
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
179 点
帖子
6
精华
0
在线时间
52 小时
注册时间
2012-9-22
最后登录
2024-5-24

楼主
thunderhit 发表于 2016-6-11 12:06:20 |AI写论文
1论坛币

《基于R语言的自动数据收集:网络抓取和文本挖掘实用指南》第十章,。其中数据准备方面,如下

> library(RCurl)

> library(XML)

> library(bitops)

> library(stringr)

> all_links<- character()

> new_results<-"government/announcements?keywords=&announcement_filter_option=all&topics[]=all&departments[]=all&world_locations[]=all&from_date=01/07/2010"

> signatures<- system.file("CurlSSL",cainfo="cacert.pem",package ="RCurl")

> while(length(new_results)>0){                                          

+           new_results <-str_c("https://www.gov.uk/",new_results)

+           results <-getURL(new_results,cainfo=signature)

+           results_tree <- htmlParse(results)

+           all_links <- c(all_links,xpathSApply(results_tree,"//li[@id]//a",xmlGetAttr,"href"))

+           new_results <-xpathSApply(results_tree,"//nav[@id='show-more-documents']//li[@class='next']//a",xmlGetAttr,"href")

+  }

Error in function(type, msg, asError = TRUE)  :

  error setting certificate verify locations:

  CAfile: ? CApath: none

> signatures

[1] "D:/ProgramFiles (x86)/R/R-3.3.0/library/RCurl/CurlSSL/cacert.pem"

有哪位大神可以帮着解决一下这报错啊


关键词:path file none APA Caf 数据抓取 R语言

沙发
AMREDA 发表于 2017-8-14 18:46:10
请问这个问题楼主解决了吗

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-27 03:40