Home >Web Front-end >HTML Tutorial >How does this web page obtain actual data? _html/css_WEB-ITnose
I am doing some program to collect data from web pages. For example, stock data, such as this web page:
http://stock.jrj.com.cn/share,600036.shtml
You can see that part of the page looks like this:
I want to use a program to collect some of these data:
Yesterday’s closing: 18.36 yuan Highest: 18.86 yuan High limit: 20.20 yuan
Today’s opening: 18.60 yuan Lowest: 18.41 yuan Lower limit: 16.52 yuan
Data The idea of collection is very easy, just get back its html and then analyze and extract it. The html I want to get back is like this:
… ;
But I checked the above page, and its html is actually like this:
… /TD>
" " ;/EM>
...
There is no specific data in the html. I can't extract the data I want from this html.
The data seems to be obtained from the Internet in real time by calling an unknown place. Because if I disconnect from the network and open this html file, it will look like this:
All the data will change to "--". If you are connected to the Internet, it will be normal. I really want to know how this webpage obtains data? Which js function was adjusted? How do you know which one it is? It seems to be related to the tag? Because if I remove these tags, regardless of whether I am connected to the Internet or not, the browser display will be as shown above. But I checked the tag on Baidu. Doesn’t it emphasize that it only affects the font? How does it have anything to do with data? I don't know much about html and css. Please give me some advice. How do you get the real-time data of this web page? Thank you so much!
Reply to discussion (solution)
http://www.cnblogs.com/me115/archive/2011/05/09/2040826.html
http://hq.sinajs.cn/list=sh600036
http://www.cnblogs.com/me115/archive/2011/05/09/2040826.html
This article I Have looked at it too, but I want to extract more than just stock information. I'm just giving an example. I just want to find a way to extract the data of web pages like the one on the first floor
This is loaded by ajax. You need to find the data source (the real URL of the data)
http://qmx.jrjimg.cn/stocks/pubdata/hotHqData.js
Analysis script
Browser f12 Network tab View record