Jump to content
  • Advertisement
Sign in to follow this  
gretty

[HTML] Obtain search data from google source code

This topic is 2800 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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 ***

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
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>

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!