[HTML] Obtain search data from google source code

Started by
2 comments, last by mozie 13 years, 6 months ago
Hello

You know when you search for something on google, & the results page will display "About 30,800,000 results (0.14 seconds)".


Well I would like to extract the number of search results ("30,800,000") & the time it took (0.14) from google source code.

But my problem is that when I read the HTML source code from a searched page, there is no area that says something like
<p id="searchResultData"> About 30,800,000 results....

Now am I just not looking properly (I have used find & stuff also), or is it not there. And if its not there, how does google generate its pages(it would be interesting to know - but also to solve my issue) & is there a way to obtain the information I need from googles HTML code or is google too mean?


Example of the HTML source code of a google search for "Pony" :P, PS not even the word Pony or hyperlinks to the search results appear in the HTML code (how does google do that?):

**edit I removed it coz its waaay too long & stuffed up the display of the post ***
Advertisement
Look for the div with id="resultStats" for those statistics. [smile]

- Jason Astle-Adams

There is no div with the id = resultStats. Did you find a div with this id? And if so what line is it at?

I am using the 'find' function in the window to look for "resultStats", or even just "results" & the word doesn't occur in the source code
What are you using to view the source?

I was able to locate this on line 6 of a standard Google search:
<div id=resultStats>About 756,000,000 results<nobr>  (0.14 seconds) </nobr>

This topic is closed to new replies.

Advertisement