R Error using readHTMLTable

前端 未结 2 1028
悲&欢浪女
悲&欢浪女 2020-12-28 11:45

I am using the following code:

url  = \"http://finance.yahoo.com/q/op?s=DIA&m=2013-07\"

library(XML)
tabs = readHTMLTable(url, stringsAsFactors = F)
         


        
2条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-28 12:34

    I just got the same error as above "failed to load external entity" when using url <- "http://www.cisco.com/c/en/us/products/a-to-z-series-index.html" doc <- htmlTreeParse(url, useInternal=TRUE)

    I came across this and another post on the topic, which didn't solve my problem. This code worked before. I then realized that I was on corporate VPN. I got off the VPN and tried again and it worked. So, being on VPN might be another reason why you would get the above error. Getting off VPN solves it.

提交回复
热议问题