which parser will you use to parse HTML?
On 02 Mar 2014, at 06:49, Sean P. DeNigris <[email protected]> wrote:
> In porting the Mechanize web scraping library from Ruby, I started with the
> following example:
> a.get('http://google.com/') do |page|
> search_result = page.form_with(:name => 'f') do |search|
> search.q = 'Hello world'
> end.submit
>
> It GETs
> http://www.google.com/search?ie=ISO-8859-1&hl=en&source=hp&q=Hello+world&gbv=1
>
> I tried to do that with Zinc via formAt: name put:, but when I sent #get,
> the query was empty and the response was another blank search form. It took
> me some time to figure out what was going on and change to #queryPut:at: in
> the GET case, but now I'm managing form logic from the outside. Since GET is
> valid for forms (apparently it is the default per
> http://www.w3schools.com/tags/att_form_method.asp), it seems Zinc should
> handle this more gracefully. I would expect it to check for form fields and
> add them to the query when doing a GET. What do you think?
>
> n.b. Gofer it
> smalltalkhubUser: 'SeanDeNigris' project: 'Mechanize';
> package: 'Mechanize';
> load.
>
>
>
>
>
>
>
> -----
> Cheers,
> Sean
> --
> View this message in context:
> http://forum.world.st/Zinc-bug-submitting-form-via-GET-tp4747276.html
> Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
>