忘记密码   免费注册 查看新帖 | 论坛精华区

ChinaUnix.net

  平台 论坛 博客 认证专区 大话IT HPC论坛 徽章 文库 沙龙 自测 下载 频道自动化运维 虚拟化 储存备份 C/C++ PHP MySQL 嵌入式 Linux系统
最近访问板块 发新帖
查看: 334 | 回复: 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数据呢?

论坛徽章:
2
程序设计版块每日发帖之星
日期:2016-05-03 06:20:0015-16赛季CBA联赛之同曦
日期:2017-09-11 14:39:48
发表于 2017-11-02 10:04 |显示全部楼层
在curl命令中,把『!』换成『%21』
您需要登录后才可以回帖 登录 | 注册

本版积分规则

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号 北京市公安局海淀分局网监中心备案编号:11010802020122
广播电视节目制作经营许可证(京) 字第1234号 中国互联网协会会员  联系我们:
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP