时间:2022-05-29 19:15:02 | 来源:网络营销
时间:2022-05-29 19:15:02 来源:网络营销
为了提升站点提交的优质资源的处理效率,搜索资源平台对平台工具的sitemap文件提交配额进行限制,平台将基于站点资源质量和搜索用户喜欢程度综合评估计算站点提交配额,站点不同,提交配额也可能不同。curl -H 'Content-Type:text/plain' --data-binary @urls.txt使用php、python、java等可以参照这个过程推送结构化数据。
"http://data.zz.baidu.com/urls?site=www.example.com&token=edk7yc4rEZP9pDQD"
POST /urls?site=www.58.com&token=edk7ychrEZP9pDQD HTTP/1.1(3)、php推送示例
User-Agent: curl/7.12.1
Host: data.zz.baidu.com
Content-Length: 83
http://www.example.com/1.html
http://www.example.com/2.html
$urls = array((4)、ruby推送示例
'http://www.example.com/1.html',
'http://www.example.com/2.html',
);
$api = 'http://data.zz.baidu.com/urls
site=www.58.com&token=edk7ychrEZP9pDQD';
$ch = curl_init();
$options = array(
CURLOPT_URL => $api,
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POSTFIELDS => implode("/n", $urls),
CURLOPT_HTTPHEADER => array('Content-Type: text/plain'),
);
curl_setopt_array($ch, $options);
$result = curl_exec($ch);
echo $result;
require 'net/http'亿企邦点评:
urls = ['http://www.example.com/1.html', 'http://www.example.com/2.html']
uri = URI.parse('http://data.zz.baidu.com/urls
site=www.xxx.com&token=eTk7ychrWZP1pDQD')
req = Net::HTTP::Post.new(uri.request_uri)
req.body = urls.join("/n")
req.content_type = 'text/plain'
res = Net::HTTP.start(uri.hostname, uri.port) { |http| http.request(req) }
puts res.body
关键词:公告,文件,调整