zoukankan      html  css  js  c++  java
  • 一个练习题的代码

    import requests
    import re
    header={
    'Cookie': 'gxfda_supervise_id=0000QdmIkkDNPaUemUTEEPvggv6:19lo8hslj',
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36',
    'Referer': 'http://oa.gxfda.gov.cn/gxfda_supervise/appnet/appEntpList.action?entpType=002',
    }
    source=requests.get('http://www.gxfda.gov.cn/gxfdanet/gxdataylqxscqy.jhtml',headers=header).text
    # print(source)
    url=re.compile('<iframe border="0" frameborder="0" framespacing="0" height="725" marginheight="0" marginwidth="0" name="12" noresize scrolling="no" src="(.*?)" width="1003" vspale="0"> </iframe>',re.S).findall(source)
    print(url)
    source1=requests.get(url[0],headers=header).text
    # print(source1)
    token=re.compile('<input type="hidden" name="token" value="(.*?)" />').findall(source1)
    print(token[0])
    data={
    'token':token[0],
    'pageNumber': '1'
    }
    s=requests.post('http://oa.gxfda.gov.cn/gxfda_supervise/appnet/appEntpList.action',headers=header,data=data).text
    print(s)
  • 相关阅读:
    报表插件
    开发工具安装运行bug总结
    UML学习笔记
    Asp.net MVC中的ViewData与ViewBag
    mvc 4 Razor (@html.xx)语法大全以及应用
    数据大并发处理
    vs2010常用快捷方式
    asp.net mvc3+EF4.1项目实战
    jquery,javascript常用
    vs2010常见错误
  • 原文地址:https://www.cnblogs.com/mypath/p/9274445.html
Copyright © 2011-2022 走看看