zoukankan      html  css  js  c++  java
  • Content-Type: text/x-gwt-rpc; charset=UTF-8

    Content-Type: text/x-gwt-rpc; charset=UTF-8

    下载某个统计局网站,它的 Content-Type: text/x-gwt-rpc; charset=UTF-8

    请求方式是 post 请求 

    一言不合就上代码  

       url = 'http://data.ahtjj.gov.cn/bi/gwt/zbquery/zbquery'
         headers = {
    
            # "Host":"data.ahtjj.gov.cn",
            # "Connection":"keep-alive",
            # "Content-Length":"229",
            # "X-GWT-Module-Base":"http://data.ahtjj.gov.cn/bi/gwt/zbquery/",
            "X-GWT-Permutation":"5E9EB141DCF5CC57E7A3405E21549935",
            "User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36",
            "Content-Type":"text/x-gwt-rpc; charset=UTF-8",
            # "Accept":"*/*",
            # "Origin":"http://data.ahtjj.gov.cn",
            # "Referer":"http://data.ahtjj.gov.cn/bi/zbquery/querymodel/querymodel.jsp?op=0&title=&id=Guid&onlyShowResult=false&schemeGuid=000001504639C3767B183BA575010B5F&function=1&windowId=015047581BC92300BC917A48BDF3322E_w129",
            # "Accept-Encoding":"gzip, deflate",
            # "Accept-Language":"zh-CN,zh;q=0.9",
            "Cookie":"JSESSIONID=B69622EB88A9A3E861C9BF5AC6485B12; clientlanguage=zh_CN; JSESSIONID=0794B111C9E5CBBD6B204A87FCF4B216",
    
        }
        data = '7|0|7|http://data.ahtjj.gov.cn/bi/gwt/zbquery/|6743B66F1ECCF1017396C8890D6319A5|com.jiuqi.bi.client.zbquery.querymodel.ZBQueryService|getChildren|java.lang.String/2004016611|com.jiuqi.bi.client.zbquery.common.enums.ImgType/3271576811|000001504639C3767B183BA575010B5F|1|2|3|4|2|5|6|7|6|3|'
        try:
            result = session.post(url=url,data=data,headers=headers).content
        except:
            result = session.post(url=url,data=data, headers=headers).content
    

      

  • 相关阅读:
    Quartus 自定义一个IP核,通过AXI总线被HPS系统控制(未完待续)
    IR 发送数据的上升沿和下降沿的判断(边沿检测)
    机器学习特征工程和优化方法
    最大期望算法(EM)
    主题模型(Topic Model)
    马尔科夫(Markov)
    【mysql-02-2】使用文档-建表约束
    【mysql-02-3】使用文档-范式
    【mysql-02-1】使用文档-基本语法
    Linux身份鉴别机制原理
  • 原文地址:https://www.cnblogs.com/xuchunlin/p/14121134.html
Copyright © 2011-2022 走看看