由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - 请教一个抓取网页内容的问题
相关主题
perl 问题求教这个网站是怎么在源码中隐藏url地址的?
我能从youtube上下载html5保护的video。python question: A socket operation was attempted to an unreachable network
goodbug,jsp里,用angularjs的多吗?套在P民头上的信息枷锁又升级了zz
编译通过 运行时出现 error while loading shared libraries 是哪的问题?推荐一款监测网络活动的软件
JavaScript 问题继续求教(50伪币求答案..)求解:socket client用node.js, socket server用c++
常用的调试网络的命令,除了ping和traceroute,还有什么? (转载)How to read/load a .tif image? (转载)
怎样把snoop的文本结果抽出来?re一问
如何截取浏览器向服务器发送的数据请教一个变态的regular expression 替换
相关话题的讨论汇总
话题: emcpublish话题: bytrecv话题: 抓取话题: regex
进入Programming版参与讨论
1 (共1页)
f****k
发帖数: 85
1
底下这个是中国空气质量的实时数据,请问怎么能把右下的实时监测数据用程序自动抓
取,每隔一定的时间抓取一次?对网络编程没有任何基础,希望各位能提供点思路。
http://113.108.142.147:20035/emcpublish/
c*********e
发帖数: 16335
2
silverlight做的,还是避开吧,这玩艺現在没人用了。

【在 f****k 的大作中提到】
: 底下这个是中国空气质量的实时数据,请问怎么能把右下的实时监测数据用程序自动抓
: 取,每隔一定的时间抓取一次?对网络编程没有任何基础,希望各位能提供点思路。
: http://113.108.142.147:20035/emcpublish/

d******e
发帖数: 2265
3
you can use cron to control your task script and use jquery to query the
table, and save it into csv.
it is pretty easy

【在 f****k 的大作中提到】
: 底下这个是中国空气质量的实时数据,请问怎么能把右下的实时监测数据用程序自动抓
: 取,每隔一定的时间抓取一次?对网络编程没有任何基础,希望各位能提供点思路。
: http://113.108.142.147:20035/emcpublish/

l**********n
发帖数: 8443
4
that thing is sliverlight. is there a jquery lib to query it?

【在 d******e 的大作中提到】
: you can use cron to control your task script and use jquery to query the
: table, and save it into csv.
: it is pretty easy

f****k
发帖数: 85
5
是,但是我不是想学silverlight,只是需要保存这些数据。:)

【在 c*********e 的大作中提到】
: silverlight做的,还是避开吧,这玩艺現在没人用了。
l**********n
发帖数: 8443
6
如果那玩意是silverlight,你怎么获取其中的数据?

【在 f****k 的大作中提到】
: 是,但是我不是想学silverlight,只是需要保存这些数据。:)
f****k
发帖数: 85
7
Good to know! Thanks! I will look into these.

【在 d******e 的大作中提到】
: you can use cron to control your task script and use jquery to query the
: table, and save it into csv.
: it is pretty easy

f****k
发帖数: 85
8
I don't know.
我看了下网页的html代码,发现这段东西:

这个是不是说数据都是从这个emcpublish/ClientBin/Cnemc.xap里面读取的?
I guess this doesn't answer your question though...

【在 l**********n 的大作中提到】
: that thing is sliverlight. is there a jquery lib to query it?
l**********n
发帖数: 8443
9
xap就是silverlight

【在 f****k 的大作中提到】
: I don't know.
: 我看了下网页的html代码,发现这段东西:
:
: 这个是不是说数据都是从这个emcpublish/ClientBin/Cnemc.xap里面读取的?
: I guess this doesn't answer your question though...

f****k
发帖数: 85
10
这就是我想figure out的啊,但是听起来似乎是不可能的?

【在 l**********n 的大作中提到】
: 如果那玩意是silverlight,你怎么获取其中的数据?
相关主题
常用的调试网络的命令,除了ping和traceroute,还有什么? (转载)这个网站是怎么在源码中隐藏url地址的?
怎样把snoop的文本结果抽出来?python question: A socket operation was attempted to an unreachable network
如何截取浏览器向服务器发送的数据套在P民头上的信息枷锁又升级了zz
进入Programming版参与讨论
g*****g
发帖数: 34805
11
You have 2 ways. 1. Reverse engineer the silverlight code and figure out the
url and request format.
2. Use packet analyzer like Wireshark

【在 f****k 的大作中提到】
: 这就是我想figure out的啊,但是听起来似乎是不可能的?
l**********n
发帖数: 8443
12
the data is passed as xml file.
http://113.108.142.147:20035/emcpublish/Content/LoadB.xaml
you should be able to figure out the part that you want.
l**********n
发帖数: 8443
13
it first loads the data and then loads the xap.
c*********e
发帖数: 16335
14
//下载数据
WebClient client=new WebClient();
byte[] bytRecv=client.DownloadData("http://xxx.xxx.html");
string str=System.Text.Encoding.GetEncoding("gb2312").GetString(bytRecv);

//提取信息
string regexStr=@"xxxxxxx";
Regex re=new Regex(regexStr,RegexOptions.IgnoreCase|RegexOptions.
Singleline|RegexOptions.IgnorePatternWhitespace);
MatchCollection mc=re.Matches(str);

【在 f****k 的大作中提到】
: 底下这个是中国空气质量的实时数据,请问怎么能把右下的实时监测数据用程序自动抓
: 取,每隔一定的时间抓取一次?对网络编程没有任何基础,希望各位能提供点思路。
: http://113.108.142.147:20035/emcpublish/

q****l
发帖数: 152
15
用小猪SEO浏览器,如果数据格式复杂,需要学会用P语言,可以建立自动抓取任务
f****k
发帖数: 85
16
非常感谢!不过,弱问一句:这是什么语言?

bytRecv);

【在 c*********e 的大作中提到】
: //下载数据
: WebClient client=new WebClient();
: byte[] bytRecv=client.DownloadData("http://xxx.xxx.html");
: string str=System.Text.Encoding.GetEncoding("gb2312").GetString(bytRecv);
:
: //提取信息
: string regexStr=@"xxxxxxx";
: Regex re=new Regex(regexStr,RegexOptions.IgnoreCase|RegexOptions.
: Singleline|RegexOptions.IgnorePatternWhitespace);
: MatchCollection mc=re.Matches(str);

f****k
发帖数: 85
17
P语言是指python么?

【在 q****l 的大作中提到】
: 用小猪SEO浏览器,如果数据格式复杂,需要学会用P语言,可以建立自动抓取任务
f****k
发帖数: 85
18
我下载了wireshark,跟着youtube学习了一下,还在继续折腾中。

the

【在 g*****g 的大作中提到】
: You have 2 ways. 1. Reverse engineer the silverlight code and figure out the
: url and request format.
: 2. Use packet analyzer like Wireshark

l**********n
发帖数: 8443
19
C#

【在 f****k 的大作中提到】
: 非常感谢!不过,弱问一句:这是什么语言?
:
: bytRecv);

1 (共1页)
进入Programming版参与讨论
相关主题
请教一个变态的regular expression 替换JavaScript 问题继续求教(50伪币求答案..)
any way to use regex in Fortran?常用的调试网络的命令,除了ping和traceroute,还有什么? (转载)
匹配问题 (转载)怎样把snoop的文本结果抽出来?
装完boost之后还要再装REGEX吗?如何截取浏览器向服务器发送的数据
perl 问题求教这个网站是怎么在源码中隐藏url地址的?
我能从youtube上下载html5保护的video。python question: A socket operation was attempted to an unreachable network
goodbug,jsp里,用angularjs的多吗?套在P民头上的信息枷锁又升级了zz
编译通过 运行时出现 error while loading shared libraries 是哪的问题?推荐一款监测网络活动的软件
相关话题的讨论汇总
话题: emcpublish话题: bytrecv话题: 抓取话题: regex