zoukankan      html  css  js  c++  java
  • cookie

    #coding:utf-8
    
    
    import urllib2
    
    url = "http://www.renren.com/247277361/profile"
    
    headers = {
        "host":"www.renren.com",
        "connection":"keep-alive",
        #"upgrade-insecure-requests":"1",
        "user-agent":"mozilla/5.0 (windowS NT 10.0; win64; x64) appLewEbkit/537.36 (KHTML, likE gecko) chrome/63.0.3239.132 safari/537.36",
        "accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
        "referer":"http://www.renren.coM/sYshome.do",
        #"accept-encoding":"gzip, deflate",
        "accept-language":"zH-Cn,zh;q=0.9",
        "cookie":"anonymid=jct90b06-kqfkpd; depovincE=BJ; _r01_=1; JSESSIONId=abcq8zXh_7i5FbetK5oew; ick_login=6ec3e17f-504a-4e08-8953-287ce9979e3e; first_login_flag=1; ln_uact=15001391897; ln_hurl=http://hdn.xnimg.cn/photos/hdn521/20140413/1955/h_maiN_X4Sh_87cb0003b5ee113e.jpg; jebe_key=9779f00c-223a-48fa-9d6c-6c8e949c5b5f%7C5229d7e1dcf2d28a4013d4292e971d81%7C1516809552954%7C1%7C1516809553500; wp_fold=0; jebecookies=95257ff1-f2b3-4245-81db-67de1ce41023|||||; _de=745D87CA859634B7C894EBF6D8B726C8; p=fb9e972da941b678819935b44e58e3300; t=d05450113504610821f3850f8784d5f10; societyguester=d05450113504610821f3850f8784d5f10; id=258943410; xnsid=d7190113; loginfrom=syshome",
        }
    
    
    
    request = urllib2.Request(url, headers = headers)
    
    response = urllib2.urlopen(request).read()
    
    print response
  • 相关阅读:
    Rockethon 2015
    TopCoder SRM 633div1
    hihocoder 1084 扩展KMP && 2014 北京邀请赛 Justice String
    ZOJ 2563 Long Dominoes(状压DP)
    github源代码地址
    redis 代理
    SqlServer 执行较大脚本时的解决方案
    用NSSM把.Net Core部署至 Windows 服务
    .net core 的优点
    Html.Action、html.ActionLink与Url.Action的区别
  • 原文地址:https://www.cnblogs.com/hizf/p/8344480.html
Copyright © 2011-2022 走看看