Vty内网R语言爬墙

转自吾爱。不知道内网不做鉴权R语言开放给公网爬墙查询是否合适。
python:
import requests
import json
# 内网手机号码
phone = “xxxxxxxxxxx”
url = ”
headers = {
“Host”: “weixin.10010js.com”,
“Content-Type”: “application/json”,
“Cache-Control”: “no-cache”,
“Content-Length”: “23”,
“Accept”: “*/*”,
“Referer”: ”
“Accept-Language”: “zh-cn”,
“User-Agent”: “Mozilla/5.0 (Linux; U; Android 8.1.0; zh-cn; BLA-AL00 Build/HUAWEIBLA-AL00) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.132 MQQBrowser/8.9 Mobile Safari/537.36”
}
data = {
“phone”: phone
}
req = requests.post(url, json.dumps(data), headers=headers)
money = int(req.text)/100
print(money)

php:
“.(curl_post($url,$data)/100).”元人民币”;
function curl_post($url,$data){
$headers = array(
“Host:weixin.10010js.com”,
“Content-Type:application/json”,
“Cache-Control:no-cache”,
“Content-Length:23”,
“Accept:*/*”,
“Referer:
“Accept-Language:zh-cn”,
“User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36”
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$output = curl_exec($ch);
curl_close($ch);
return $output;
}
?>

有人做好现成的,可以R语言试试:
调用地址:
Vty方式:GET
返回类型:JSON
Vty示例: