Python3网络爬虫requests库保存登录cookies无法显示登录后的结果

无法正常返回知乎登录后结果

代码如下

#encoding: utf-8

import requests

headers = {
    'Cookie': '_zap=87dc21f4-4434-498f-b453-b9c42fcd1bd3; __DAYU_PP=VAJA2vVMb7AaV77ejRbyffffffff8273b7656662; d_c0="AODvSFV8jQ2PTmDTICH3DTRJZYAZoNxxOsY=|1525613242"; __utmv=51854390.100-1|2=registration_date=20171030=1^3=entry_date=20171030=1; _xsrf=0Ium8T8U1eGHOSovneHQZEzqxtGqlWwX; tst=h; q_c1=613111b925284b2da4cd3d5228b02527|1555683102000|1517033409000; __utma=51854390.573037124.1532488641.1549508140.1558276424.5; __utmz=51854390.1558276424.5.5.utmcsr=zhihu.com|utmccn=(referral)|utmcmd=referral|utmcct=/hot; tgw_l7_route=7c109f36fa4ce25acb5a9cf43b0b6415; capsion_ticket="2|1:0|10:1559398519|14:capsion_ticket|44:ZjA1YmVmODhkYThiNGVlZGIxMzM2MTg0OTA0MTc4NDA=|0648ddcb358f024fa2dafbca51349afae4a92a23eb19471647a8aea392f406a8"; z_c0="2|1:0|10:1559398523|4:z_c0|92:Mi4xcFRCYUJnQUFBQUFBNE85SVZYeU5EU1lBQUFCZ0FsVk5lOWJmWFFEQWJqa05ad09YLU9uZENpcDFzdE1BU0Q0OXRR|79fbfc7e9403dd6240cb836c3801958a3ed85b1032eeb2f848b5f9646828ff20"',
    'Host': 'www.zhihu.com',
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36'
}
r = requests.get('https://www.zhihu.com', headers=headers)
print(r.text)

结果如下Python3网络爬虫requests库保存登录cookies无法显示登录后的结果_第1张图片
望大佬们指点

你可能感兴趣的:(Python爬虫)