百度header可用作爬虫
2020-03-11 本文已影响0人
Chting
$header = [
"Accept" => "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3",
"Accept-Encoding" => "gzip, deflate, br",
"Accept-Language" => "zh-CN,zh;q=0.9,en;q=0.8",
"Cache-Control" => "max-age=0", "Connection: keep-alive",
'Host' => 'm.baidu.com',
'Referer' => 'https://m.baidu.com/',
'Sec-Fetch-Mode' => 'navigate',
'Sec-Fetch-Site' => 'none',
'Sec-Fetch-User' => '?1',
'Upgrade-Insecure-Requests' => '1',
'User-Agent' => 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Mobile Safari/537.36',
];
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3",
"Accept-Encoding:gzip, deflate, br",
"Accept-Language: zh-CN,zh;q=0.9,en;q=0.8",
"Cache-Control: max-age=0",
"Connection: keep-alive",
'Host:m.baidu.com',
'Referer:https://m.baidu.com/','Sec-Fetch-Mode:navigate',
'Sec-Fetch-Site:none',
'Sec-Fetch-User:?1','Upgrade-Insecure-Requests:1',
'User-Agent:Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Mobile Safari/537.36