J
Jess Graves
In WWW::Scraper::Google (a module by Glenn Wood), a this hash is
declared:
(exactly as in Google.pm)
my $scraperRequest =
{
'fieldTranslations' => {
'*' => {
'*' => '*'
}
},
#http://www.google.com/search?hl=en&lr=&ie=UTF-8&oe=utf-8&safe=active&q=turntable&btnG=Google+Search
'SKIP' => ''
'nativeDefaults' => {
'q' => '',
#'as_eq' => 'turntable',
#'oe' => 'utf-8',
#'as_q' => '',
'lr' => '',
'hl' => 'en',
'btnG' => 'Google Search',
'safe' => 'active',
#'as_epq' => 'google com',
#'as_sitesearch' => '',
#'as_oq' => '',
'ie' => 'UTF-8'
},
'nativeQuery' => 'q',
'url' => 'http://www.google.com/search?',
'cookies' => 0,
'type' => 'QUERY',
'defaultRequestClass' => undef
};
The first key fieldTranslations is assigned something I can't figure
out and I've had no luck searching (and searching and searching) for
the answer.
(If Google could just include symbols in their indexing life would be
so much better...)
Does the asterisk have any special meaning used like this? Could this
be as mundane as a hash field pointing to a hash field with a single
key that is an asterisk that points to a hash that has... yadda
yadda.. ?
If anyone knows what this:
'fieldTranslations' => {
'*' => {
'*' => '*'
}
},
accomplishes, I'd be greatful for some insight.
Thanks,
Jess
declared:
(exactly as in Google.pm)
my $scraperRequest =
{
'fieldTranslations' => {
'*' => {
'*' => '*'
}
},
#http://www.google.com/search?hl=en&lr=&ie=UTF-8&oe=utf-8&safe=active&q=turntable&btnG=Google+Search
'SKIP' => ''
'nativeDefaults' => {
'q' => '',
#'as_eq' => 'turntable',
#'oe' => 'utf-8',
#'as_q' => '',
'lr' => '',
'hl' => 'en',
'btnG' => 'Google Search',
'safe' => 'active',
#'as_epq' => 'google com',
#'as_sitesearch' => '',
#'as_oq' => '',
'ie' => 'UTF-8'
},
'nativeQuery' => 'q',
'url' => 'http://www.google.com/search?',
'cookies' => 0,
'type' => 'QUERY',
'defaultRequestClass' => undef
};
The first key fieldTranslations is assigned something I can't figure
out and I've had no luck searching (and searching and searching) for
the answer.
(If Google could just include symbols in their indexing life would be
so much better...)
Does the asterisk have any special meaning used like this? Could this
be as mundane as a hash field pointing to a hash field with a single
key that is an asterisk that points to a hash that has... yadda
yadda.. ?
If anyone knows what this:
'fieldTranslations' => {
'*' => {
'*' => '*'
}
},
accomplishes, I'd be greatful for some insight.
Thanks,
Jess