Sandor Szücs
1/22/2009 10:13:00 AM
On 21.01.2009, at 05:46, Edouard Dantes wrote:
>
> I am writing a method to perform a similar to the below mentionned
> google search but i want it to accept the field's name for the search
> entry as a string.
>
> In the following example from the Mechanize docs I would expect it =20
> to be
> search.send('q') instead of search.q but I get this error
In the example the method which is called is not q(). It's q=3D(), so
if you want so send() then use the right method.
> ./scrapingGoogle.rb:14: syntax error, unexpected '=3D', expecting kEND
> search.send('q') =3D 'Hello world'.
search.send('q=3D', 'Hello World') or by symbol
search.send(:q=3D, 'Hello World')
regards, Sandor Sz=FCcs
--