找回密码
 立即注册

QQ登录

只需一步,快速开始

大师杰作

初级会员

14

主题

61

帖子

309

积分

初级会员

积分
309

圣诞拼拼乐

大师杰作
初级会员   /  发表于:2022-12-20 11:52  /   查看:1181  /  回复:5
1金币
如题,我需要获取的数据页面是http://192.168.1.104:9088/PMMS/RunAnalysis/MNRunInfo?MN=07608882005609,返回一个页面信息:

[backcolor=var(--background-color-primary)][backcolor=var(--background-color-primary)]<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>MNRunInfo</title> <link href="/Content/easyui/themes/icon.css" rel="stylesheet" /> <link href="/Content/easyui/themes/metro-blue/easyui.css" rel="stylesheet" /> <script src="/Content/JS/jquery-3.0.0.min.js" type="text/javascript"></script> <script src="/Content/easyui/jquery.easyui.min.js" type="text/javascript"></script> <link href="/Content/easyui/themes/icon.css" rel="stylesheet" /> <script src="/Content/easyui/locale/easyui-lang-zh_CN.js" type="text/javascript"></script> <script src="/Content/JS/messageInfo.js" type="text/javascript"></script> <script src="/Scripts/jquery.cookie.js" type="text/javascript"></script> <script src="/Content/Echarts/echarts.min.js" type="text/javascript"></script> <script src="/Content/Echarts/DFSoft.ECharts.js" type="text/javascript"></script> <script src="/Scripts/CommJs.js" type="text/javascript"></script> <link href="/Content/Sysico.css" rel="stylesheet" type="text/css" /> <link href="/Content/DataStyle.css" rel="stylesheet" type="text/css" /> <link href="/Content/SysFrame.css" rel="stylesheet" type="text/css" /> <script src="/Content/JS/Tools.js"></script> <style type="text/css"> body { margin: 0px; font-family: 'Microsoft YaHei'; font-size: 12px; } a { text-decoration: none; color: black; } a:hover { color: blue; } .black_overlay { position: fixed; top: 0%; left: 0%; width: 100%; height: 100%; background-color: black; z-index: 10001; -moz-opacity: 0.2; opacity: .20; filter: alpha(opacity=20); } .white_content_load { position: fixed; top: 40%; left: 40%; width: 200px; text-align: center; line-height: 25px; height: 25px; border: 1px solid #fff; background-color: #555; color: #fff; z-index: 10002; overflow: hidden; /*-moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px;*/ } .mainContent { margin-left: 2px; margin-right: 2px; margin-bottom: 2px; height: auto; } .mainContent .topTool { height: auto; } .ulTop { padding:2px; margin-top:0px; } .ulTop li { line-height: 35px; height: 35px; list-style: none; text-align: left; } .mainContent .Content { width: 100%; overflow-x:hidden; overflow-y:auto; } .splitbar { height: 2px; } </style> <script type="text/javascript"> //var iDialogWidth = 650;//打开新窗口默认宽度 //var iDialogHeight = 400;//打开新窗口默认高度 function ShowLoad() { $("#loadBar").show(); } function HideLoad() { $("#loadBar").hide(); } //调用后台数据处理功能 function PostAction(url, data, callback) { $.ajax({ url: url, data: data, type: "post", dataType: 'json', contentType: 'application/json; charset=utf-8', beforeSend: function () { ShowLoad(); }, success: function (result) { callback(result); }, complete: function () { HideLoad(); }, error: function (ex) { //$.messager.alert("提示", "出现错误!"); HideLoad(); } }); } function PostActionHtml(url, data, callback) { $.ajax({ url: url, data: data, type: "post", dataType: 'html', contentType: 'application/json; charset=utf-8', cache: false, beforeSend: function () { ShowLoad(); }, success: function (result) { callback(result); }, complete: function () { HideLoad(); }, error: function (ex) { //$.messager.alert("提示", "出现错误!"); HideLoad(); } }); } </script> </head> <body> <div id="loadBar" style="display: none"> <div class="black_overlay"></div> <div class="white_content_load">&nbsp;数据加载中,请稍后...&nbsp;</div> </div> <script src="/Content/Slides/js/jquery.slides.min.js" type="text/javascript"></script> <link href="/Content/Slides/css/css.css" rel="stylesheet" /> <style type="text/css"> table { text-align: center; } </style> <script type="text/javascript"> $(function () { $('#slides').slidesjs({ width: 400, height: 225, play: { active: true, auto: true, interval: 3000, swap: true } }); }); function ClickEnv(title,typeid, userid) { OpenWinSize("dwin", title+"信息", "/PMMS/RunAnalysis/MNResponsible?MN=07608882005609&TypeID=" + typeid + "&UID=" + userid, 800, 500); } </script> <div id="layout" class="easyui-layout" data-options="fit:true" style="width:100%;margin:1px;"> <div id="dwest" data-options="region:'west',split:false" style="width: 400px; height: auto; overflow-x: hidden; overflow-y: auto;"> <div class="lable_title"><span>站点照片</span></div> <div style="margin-top:0px;width:400px;height:225px"> <div id="slides" class="slides"> <img src="/Upload/StationImage/07608882005609_3.jpg" /> <img src="/Upload/StationImage/07608882005609_3.jpg" /> </div> </div> <br /> <br /> <div class="lable_title"><span>站点简介</span></div> <p style="text-indent:2em;">简介内容……</p> </div> <div id="dcenter" data-options="region:'center'" style="overflow-x:hidden;overflow-y:auto;"> <div class="lable_title"><span>站点基本信息</span></div> <table class="tb" style="width:100%;"> <tr> <td class="alt">站点名称</td> <td>W-东升医院</td> <td class="alt">MN编号</td> <td>07608882005609</td> </tr> <tr> <td class="alt">所属企业</td> <td>东升医院</td> <td class="alt">所属地区</td> <td>中山市</td> </tr> <tr> <td class="alt">关注程度</td> <td>国控</td> <td class="alt">监测类型</td> <td>地表水体环境污染源</td> </tr> <tr> <td class="alt">所属行业</td> <td>其他</td> <td class="alt">建站时间</td> <td></td> </tr> <tr> <td class="alt">经度</td> <td></td> <td class="alt">纬度</td> <td></td> </tr> <tr> <td class="alt">厂区地址</td> <td colspan="3"></td> </tr> </table> <div class="lable_title"><span>企业环保负责人</span></div> <table class="tb" style="width:100%;text-align:center;"> <tr><th>企业环保责任人</th><th>环保单位负责人</th><th>运维人员</th></tr><tr><td><a href="javascript:void(0);">点击设置</a></td><td><a href="javascript:void(0);">点击设置</a></td><td><a href="javascript:void(0);">点击设置</a></td></tr> </table> <div class="lable_title"><span>最新实时数据</span></div> <table class="tb" style="width:100%;text-align:left;"> <tr> <td colspan="5">数据时间:2022-12-20 11:33:30</td> </tr> <tr> <th>监测参数</th> <th>监测值</th> <th>标准限值</th> <th>监测单位</th> <th>数据类型</th> </tr> <tr><td>污水流速</td><td>0</td><td>-</td><td>L/s</td><td>Rtd</td></tr><tr><td>pH</td><td>13.98</td><td>-</td><td>无量纲</td><td>Rtd</td></tr> </table> <div class="lable_title"><span>运行动态</span></div> <div style="height:auto;"></div> </div> </div> <div id="dwin"></div> </body> </html>
请问如何截取:[backcolor=var(--background-color-primary)]</table> <div class="lable_title"><span>最新实时数据</span></div> <table class="tb" style="width:100%;text-align:left;"> <tr> <td colspan="5">数据时间:2022-12-20 11:33:30</td> </tr> <tr> <th>监测参数</th> <th>监测值</th> <th>标准限值</th> <th>监测单位</th> <th>数据类型</th> </tr> <tr><td>污水流速</td><td>0</td><td>-</td><td>L/s</td><td>Rtd</td></tr><tr><td>pH</td><td>13.98</td><td>-</td><td>无量纲</td><td>Rtd</td></tr> </table>[backcolor=var(--background-color-primary)] 这部分内容重新展示处理















[backcolor=var(--background-color-primary)][color=var(--content-color-secondary)]帮助

[color=var(--content-color-secondary)]内置Mock变量

[color=var(--content-color-secondary)]精简模式
[color=var(--content-color-secondary)]控制台
[color=var(--content-color-secondary)]上下分屏
[color=var(--content-color-secondary)]新窗口打开
[color=var(--content-color-secondary)]浅色模式
[color=var(--content-color-secondary)]缩放
[color=var(--content-color-secondary)]设置
[color=var(--content-color-secondary)]更新














最佳答案

查看完整内容

如果想要处理信息,一般是返回json或者XML格式的数据~您这个是html页面~如果想要获取,可以使用爬虫

5 个回复

倒序浏览
最佳答案
最佳答案
吴小胖讲师达人认证 悬赏达人认证 活字格认证
论坛元老   /  发表于:2022-12-20 11:52:28
来自 5#
如果想要处理信息,一般是返回json或者XML格式的数据~您这个是html页面~如果想要获取,可以使用爬虫
回复 使用道具 举报
Lay.Li悬赏达人认证 活字格认证
超级版主   /  发表于:2022-12-20 12:21:58
2#
您好,您这个返回信息好像是一个html页面,你需要怎么处理呢?
回复 使用道具 举报
大师杰作
初级会员   /  发表于:2022-12-20 14:30:26
3#
就是想截取数据部分
回复 使用道具 举报
Lay.Li悬赏达人认证 活字格认证
超级版主   /  发表于:2022-12-20 15:56:01
4#
你要截取的数据部分是哪个呢,这串html编码中那里有数据呢
回复 使用道具 举报
Lay.Li悬赏达人认证 活字格认证
超级版主   /  发表于:2022-12-20 17:22:23
6#
感谢小胖大佬的支持~
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部