
Mechanize 0.2.0 released - iamelgringo
http://wwwsearch.sourceforge.net/mechanize/
======
sunkencity
It is such an awesome library. Totally rocks.

To get a quick glimpse of how easy it is to work with look at this screencast:
<http://railscasts.com/episodes/191-mechanize>

------
olaf
Unfortunately, Perl-WWW::Mechanize does not yet handle Javascript, has anybody
(Perl, Python, Ruby) a solution for that? DOM+Javascript simulation comes to
my mind. Or maybe a fully controllable browser component (where DOM and JS are
built-in) with an API. Anyone with first-hand experience?

~~~
iamelgringo
Have you looked at Selenium? It might have more of what you're looking for.

~~~
hugs
Things like Mechanize and HTMLUnit are what I call "HTTP-only protocol
drivers" and are not a true-fidelity simulation of the HTML+JavaScript
environment. This is exactly the reason I created Selenium in the first place.
I had regression bugs in IE and Mozilla that I needed to verify were fixed in
the actual browsers. An emulated browser environment like Mechanize or
HTMLUnit _isn't_ a real browser that users actually use, so it doesn't solve
the regression testing problem I had.

Best of both worlds these days is in driving a headless WebKit (a true browser
driver that includes the JS interaction), which will be coming in Selenium 2.

~~~
olaf
Thanks, Selenium can replay user interaction sessions, but I need to set e.g.
form fields programmatically, is that possible? Maybe CPAN/Gtk2::WebKit is
also an option.

~~~
ericb
Yes, it is possible, and fairly routine in Selenium. Also, you can execute
arbitrary Javascript for whatever else you may need.

------
lunchbox
Also worth checking out is Scrapy: <http://scrapy.org/>

It's a Python scraping framework based on Twisted. It lets you use some of
Mechanize's API to describe the scraping jobs.

------
croby
This is a fantastic library. Great to see that it's still moving along.

Now, if it only had a way to execute javascript....

~~~
mumrah
I imagine you could use python-spidermonkey to execute isolated bits of JS.
But yes, getting the window object into context in python would be super
useful

------
alttab
We use the mechanize ruby gem for integration with other sites and web
applications - doing things that are not exposed through APIs but only
interface. Really cool!

Way better than Net::HTTP

------
whiskeyjack
Nifty. Always glad to see cross-pollination in the Ruby/Python/Perl world.

