Hacking Google Maps and Google Earth (ExtremeTech)

(Dana P.) #1

58 Part I — Basics


Table 4-3: Data Return for Each Item

Element Description

Summary If the search result has a listing in the Google Open Directory Project
(ODP), the summary text for the entry appears here.
URL The URL of the result.
Snippet A snippet that shows the query text in the context of the page that is
being returned. The matching query text is highlighted in bold, with the
entire snippet encoded as HTML. In some environments, this will be
encoded HTML, where tag elements have been converted to their text
equivalents suitable for displaying in a web browser. See the Perl
example (later in this chapter) for more information.
Title The title of the search result, returned as HTML. In some environments
this will be encoded HTML, where tag elements have been converted
to their text equivalents suitable for displaying in a web browser. See
the Perl example (later in this chapter) for more information.
cachedSize The size of the page in the database. The result is a string, not an
integer, including the integer size and quantifier (k for kilobytes).
relatedInformation A boolean value indicating that you can perform a related search on
Present this URL to get pages that reference this URL.
hostName If results are filtered to remove hostname duplicates, only two results
from each host are returned. In that instance, the second result in the
result list has this value set to indicate that it is the second of the two
de-duped results.
directoryCategory The category of the URL if the URL also exists within the Google ODP.
directoryTitle The title of the URL as it is referenced within the Google ODP, if the
result URL exists in the ODP.

Again, extracting and using the information contained within the individual results is reliant on
the language and environment that you are using. Later in this chapter, you’ll see examples in
Perl and Java.

Limitations
The search parameters and results have some limitations (see Table 4-4). Some of them I have
already described and are imposed as part of the license limitations; others are simply technical
limitations. I suggest checking the documentation to confirm the details in Table 4-4, as they
are subject to change.
Free download pdf