[analog-help] Translating characters in a query-string

Hugh Morris hugh at salsacardiff.com
Wed Aug 10 04:45:01 PDT 2005


On 2005-08-10 01:31 Hugh Morris wrote:
> 
> 
> On 2005-08-09 20:27 Hugh Morris wrote:
> 
>>
>>
>> On 2005-08-09 18:29 Marcel Marchon wrote:
>>
>>>  > Well, I've tried every way I can think of and I can't make it 
>>> work. What
>>>  > I'm trying to do is get the search-terms our of references from 
>>> Google
>>>  > image-search. The requests are like this:
>>>
>>> I've had the same issue and I've been somewhat successful. See here:
>>> http://blog.lazytom.com/2005/05/analyzing-google-image-search.html
>>>
>>> Please let me know if you come up with a better result ...
>>
>>
>>
>> Thanks Marcel, I'll certainly give that a go and let you know if I 
>> come up with anything else.
>>
>> Hugh
> 
> 
> It works like a dream Marcel. Thanks very much! The only small problem 
> that I can see is that image search terms that were originally quoted 
> are reported as [ %22search term%22 ], but that's a very minor hitch. 
> I'll play around with it and see if I can come up with a fix.
> 
> Hugh

Here are a couple of small improvements:

1. The final back-reference is not necessary for the extraction of the 
search term so it may as well be left off.

2. An additional REFALIAS in front of the original one will merge most 
(but not all) of the quoted search-terms with their corresponding 
unquoted terms. Probably, even better results could be achieved with a 
regular-expression, I'll look into that in future.

So what I'm using now is this:

REFALIAS 
http://images.google.*/imgres?*&prev=/images%3Fq%3D%2522*%2522%26* 
http://images.google.$1/images?q=$3&
REFALIAS http://images.google.*/imgres?*&prev=/images%3Fq%3D*%26* 
http://images.google.$1/images?q=$3&
SEARCHENGINE http://images.google.*/* q

(Each REFALIAS on one line with spaces where the linebreaks are above.)

Thanks again Marcel.

Hugh


More information about the analog-help mailing list