Hi all,
I'm a long time Rev/HyperCard user but I'm new to the Internet functionality. Specifically, I'm trying to retrieve the # of search results that Google displays when you do a search.
The number of interest is contained in the source as shown:
<div id="resultStats">About 233,000 results<nobr> (0.30 seconds) </nobr></div>
however, when I retrieve the HTML source of the page it's not there. So I'm guessing it's XML? Can anyone shed some light on how I can get that number?
Need Help Retrieving Google Search Results
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Need Help Retrieving Google Search Results
Ni hao Chow (presumed you are chinese
),
unfortunately LiveCode only supports a very small subset of HTML like basic font tags etc.
So more complex HTML (especially with CSS) is not supported and thus "the htmltext" will not
work you you in this case!
You will need to parse the bare HTML manually and extract whatever you need.
If you are familiar with RegEx (I'm not), then this may help you.
Sorry for the bad news!
Best from germany
Klaus

unfortunately LiveCode only supports a very small subset of HTML like basic font tags etc.
So more complex HTML (especially with CSS) is not supported and thus "the htmltext" will not
work you you in this case!
You will need to parse the bare HTML manually and extract whatever you need.
If you are familiar with RegEx (I'm not), then this may help you.
Sorry for the bad news!
Best from germany
Klaus
Re: Need Help Retrieving Google Search Results
Hi Wungchow,
Try this:
set the HTMLtext of fld "YOURFIELD" to URL "http://www.google.co.uk/search?q=livecode"
Using the HTMLtext picks up the number of searches.
Try this:
set the HTMLtext of fld "YOURFIELD" to URL "http://www.google.co.uk/search?q=livecode"
Using the HTMLtext picks up the number of searches.
Andy .... LC CLASSIC ROCKS!