我将以下代码段嵌套在for
循环
mywebsite <- html(webstring)
cast <- html_nodes(mywebsite,".some-node")
text_of_cast<-html_text(cast)
问题是其中一个URL返回以下错误:
parse.response(r,parser,encoding = encoding)中的错误:client 错误:(404)未找到
此错误导致我的for
循环中断,因为页面不存在。
是否可以忽略此错误并继续循环?
答案 0 :(得分:1)
听起来&#34;尝试&#34;您正在寻找基础包中的功能。