免费注册 查看新帖 |

ChinaUnix.net

  平台 论坛 博客 文库 频道自动化运维 虚拟化 储存备份 C/C++ PHP MySQL 嵌入式 Linux系统
最近访问板块 发新帖
查看: 655 | 回复: 1

[网络相关] curl 请求的页面中使用DMI,如何处理 [复制链接]

论坛徽章:
2
摩羯座
日期:2015-01-10 16:35:05摩羯座
日期:2015-01-25 22:10:41
发表于 2017-11-01 22:32 |显示全部楼层
本帖最后由 lkf1100 于 2017-11-02 09:14 编辑

有一个这样的地址
  1. http://xxx.yyy.com/statistics/plan!ajaxStatixticstrainOrderinfoCount.action?year=0&month=1&day=1&hour=1&orderstatus=3&dataType=1&showType=-1&showover=47
复制代码
请求的结果是一个json结果的网页,
  1. {"series":[[{"y":45,"x":"2017-11-02 08:11"},{"y":49,"x":"2017-11-02 08:12"},{"y":52,"x":"2017-11-02 08:13"},{"y":58,"x":"2017-11-02 08:14"},{"y":37,"x":"2017-11-02 08:15"},{"y":46,"x":"2017-11-02 08:16"},{"y":40,"x":"2017-11-02 08:17"},{"y":46,"x":"2017-11-02 08:18"},{"y":53,"x":"2017-11-02 08:19"},{"y":49,"x":"2017-11-02 08:20"},{"y":44,"x":"2017-11-02 08:21"},{"y":59,"x":"2017-11-02 08:22"},{"y":56,"x":"2017-11-02 08:23"},{"y":54,"x":"2017-11-02 08:24"},{"y":64,"x":"2017-11-02 08:25"},{"y":55,"x":"2017-11-02 08:26"},{"y":42,"x":"2017-11-02 08:27"},{"y":57,"x":"2017-11-02 08:28"},{"y":61,"x":"2017-11-02 08:29"},{"y":49,"x":"2017-11-02 08:30"},{"y":42,"x":"2017-11-02 08:31"},{"y":47,"x":"2017-11-02 08:32"},{"y":39,"x":"2017-11-02 08:33"},{"y":73,"x":"2017-11-02 08:34"},{"y":63,"x":"2017-11-02 08:35"},{"y":64,"x":"2017-11-02 08:36"},{"y":50,"x":"2017-11-02 08:37"},{"y":32,"x":"2017-11-02 08:38"},{"y":37,"x":"2017-11-02 08:39"},{"y":75,"x":"2017-11-02 08:40"},{"y":71,"x":"2017-11-02 08:41"},{"y":55,"x":"2017-11-02 08:42"},{"y":64,"x":"2017-11-02 08:43"},{"y":50,"x":"2017-11-02 08:44"},{"y":45,"x":"2017-11-02 08:45"},{"y":56,"x":"2017-11-02 08:46"},{"y":70,"x":"2017-11-02 08:47"},{"y":58,"x":"2017-11-02 08:48"},{"y":63,"x":"2017-11-02 08:49"},{"y":48,"x":"2017-11-02 08:50"},{"y":67,"x":"2017-11-02 08:51"},{"y":56,"x":"2017-11-02 08:52"},{"y":78,"x":"2017-11-02 08:53"},{"y":61,"x":"2017-11-02 08:54"},{"y":70,"x":"2017-11-02 08:55"},{"y":77,"x":"2017-11-02 08:56"},{"y":47,"x":"2017-11-02 08:57"},{"y":61,"x":"2017-11-02 08:58"},{"y":54,"x":"2017-11-02 08:59"},{"y":65,"x":"2017-11-02 09:00"},{"y":51,"x":"2017-11-02 09:01"},{"y":63,"x":"2017-11-02 09:02"},{"y":51,"x":"2017-11-02 09:03"},{"y":75,"x":"2017-11-02 09:04"},{"y":64,"x":"2017-11-02 09:05"},{"y":71,"x":"2017-11-02 09:06"},{"y":69,"x":"2017-11-02 09:07"},{"y":64,"x":"2017-11-02 09:08"},{"y":69,"x":"2017-11-02 09:09"},{"y":56,"x":"2017-11-02 09:10"},{"y":48,"x":"2017-11-02 09:11"}],[{"y":35,"x":"2017-11-02 08:11"},{"y":31,"x":"2017-11-02 08:12"},{"y":26,"x":"2017-11-02 08:13"},{"y":37,"x":"2017-11-02 08:14"},{"y":25,"x":"2017-11-02 08:15"},{"y":30,"x":"2017-11-02 08:16"},{"y":23,"x":"2017-11-02 08:17"},{"y":30,"x":"2017-11-02 08:18"},{"y":33,"x":"2017-11-02 08:19"},{"y":32,"x":"2017-11-02 08:20"},{"y":31,"x":"2017-11-02 08:21"},{"y":40,"x":"2017-11-02 08:22"},{"y":35,"x":"2017-11-02 08:23"},{"y":29,"x":"2017-11-02 08:24"},{"y":48,"x":"2017-11-02 08:25"},{"y":32,"x":"2017-11-02 08:26"},{"y":33,"x":"2017-11-02 08:27"},{"y":40,"x":"2017-11-02 08:28"},{"y":38,"x":"2017-11-02 08:29"},{"y":37,"x":"2017-11-02 08:30"},{"y":27,"x":"2017-11-02 08:31"},{"y":27,"x":"2017-11-02 08:32"},{"y":30,"x":"2017-11-02 08:33"},{"y":50,"x":"2017-11-02 08:34"},{"y":42,"x":"2017-11-02 08:35"},{"y":41,"x":"2017-11-02 08:36"},{"y":34,"x":"2017-11-02 08:37"},{"y":22,"x":"2017-11-02 08:38"},{"y":22,"x":"2017-11-02 08:39"},{"y":43,"x":"2017-11-02 08:40"},{"y":50,"x":"2017-11-02 08:41"},{"y":35,"x":"2017-11-02 08:42"},{"y":32,"x":"2017-11-02 08:43"},{"y":39,"x":"2017-11-02 08:44"},{"y":31,"x":"2017-11-02 08:45"},{"y":39,"x":"2017-11-02 08:46"},{"y":45,"x":"2017-11-02 08:47"}
复制代码


在linux下直接使用 curl 会报错
  1. curl "http://xxx.yyy.com/statistics/plan!ajaxStatixticstrainOrderinfoCount.action?year=0&month=1&day=1&hour=1&orderstatus=3&dataType=1&showType=-1&showover=47"
复制代码

像这样即包含 DMI 有需要GET的页面该如何提交呢  

如果就是?号的话好处理,但有这个叹号时就会报错, 网上查了说使用!的是DMI调用,那curl如何处理DMI调用生成的JSON数据呢?

论坛徽章:
21
程序设计版块每日发帖之星
日期:2016-05-03 06:20:0015-16赛季CBA联赛之深圳
日期:2018-06-15 14:59:3715-16赛季CBA联赛之八一
日期:2018-07-03 16:56:4615-16赛季CBA联赛之八一
日期:2018-07-05 10:34:09黑曼巴
日期:2018-07-06 15:19:5015-16赛季CBA联赛之佛山
日期:2018-08-03 13:19:3315-16赛季CBA联赛之山西
日期:2018-08-07 19:46:2315-16赛季CBA联赛之广夏
日期:2018-08-08 19:31:5015-16赛季CBA联赛之青岛
日期:2018-11-26 15:21:5015-16赛季CBA联赛之青岛
日期:2018-06-08 13:45:2815-16赛季CBA联赛之同曦
日期:2018-06-04 19:42:2015-16赛季CBA联赛之山东
日期:2018-05-30 12:44:59
发表于 2017-11-02 10:04 |显示全部楼层
在curl命令中,把『!』换成『%21』
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

数据风云,十年变迁
DTCC 第十届中国数据库技术大会已启航!

2019年5月8日~5月10日,由IT168旗下ITPUB企业社区平台主办的第十届中国数据库技术大会(DTCC2019),将在北京隆重召开。大会将邀请百余位行业专家,就热点技术话题进行分享,是广大数据领域从业人士的又一次年度盛会和交流平台。与SACC2018类似,本届大会将采用“3+2”模式:3天传统技术演讲+2天深度主题培训。大会不仅提供超100场的主题演讲,还会提供连续2天的深度课程培训,深化数据领域的项目落地实践方案。
DTCC2019,一场值得期待的数据技术盛会,殷切地希望您报名参与!

活动入口>>
  

北京盛拓优讯信息技术有限公司. 版权所有 16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122
中国互联网协会会员  联系我们:huangweiwei@it168.com
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP