美文网首页
百度header可用作爬虫

百度header可用作爬虫

作者: Chting | 来源:发表于2020-03-11 16:47 被阅读0次
     $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
    
    

    相关文章

      网友评论

          本文标题:百度header可用作爬虫

          本文链接:https://www.haomeiwen.com/subject/zgqhjhtx.html