如何解决RCurl 停止工作 不知道为什么!我可以使用浏览器获取源代码,但不能使用 RCurl
这是我一直在使用的代码。它曾经用来显示很多信息。现在它只显示一行代码。
myheader <- c(
"User-Agent"="Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.1.6)","Accept"="text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8","Accept-Language"="en-us","Connection"="keep-alive","Accept-Charset"="GB2312,utf-8;q=0.7,*;q=0.7"
)
address <- "https://www.miit.gov.cn/"
Setting9 <- unlist(getURL(address,.encoding="GBK",httpheader=myheader))
这是输出:
"<script>document.cookie=('_')+('_')+('j')+('s')+('l')+('_')+('c')+('l')+('e')+('a')+('r')+('a')+('n')+('c')+('e')+('_')+('s')+('=')+((+true)+'')+(-~[5]+'')+(+!+[]*2+'')+(4+'')+(1+5+'')+(~~[]+'')+(3+3+'')+((1|2)+'')+((2^1)+'')+((1|2)+'')+('.')+([2]*(3)+'')+(-~false+'')+((2<<1)+'')+('|')+('-')+((+true)+'')+('|')+('C')+('v')+('%')+((1<<1)+'')+('B')+('n')+('B')+('X')+('l')+('s')+('d')+('T')+('a')+('j')+('y')+('M')+('F')+('m')+('G')+('J')+('F')+('m')+('p')+('i')+('I')+('b')+('v')+('P')+('Y')+('%')+(3+'')+('D')+(';')+('m')+('a')+('x')+('-')+('a')+('g')+('e')+('=')+((2^1)+'')+(1+5+'')+(~~[]+'')+(~~{}+'')+(';')+('p')+('a')+('t')+('h')+('=')+('/');location.href=location.pathname+location.search</script>"
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。