Forum: Ruby mechanize 0.8.4 Released

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Be30361bb0b0c495e3077db43ad84b56?d=identicon&s=25 Aaron Patterson (Guest)
on 2008-10-03 08:32
(Received via mailing list)
mechanize version 0.8.4 has been released!

* <http://mechanize.rubyforge.org/>
* <http://github.com/tenderlove/mechanize/tree/master>

The Mechanize library is used for automating interaction with websites.
Mechanize automatically stores and sends cookies, follows redirects,
can follow links, and submit forms.  Form fields can be populated and
submitted.  Mechanize also keeps track of the sites that you have
visited as
a history.

Changes:

### 0.8.4

* Bug Fixes:
  * Setting the port number on the host header.
  * Fixing Authorization headers for picky servers

* <http://mechanize.rubyforge.org/>
* <http://github.com/tenderlove/mechanize/tree/master>
87e41d0d468ad56a3b07d9a6482fd6d5?d=identicon&s=25 Hemant Kumar (gnufied)
on 2008-10-03 16:43
(Received via mailing list)
On Fri, Oct 3, 2008 at 11:57 AM, Aaron Patterson
<aaron@tenderlovemaking.com> wrote:
>
I saw some of yours posts about running Mechanize on top of
EventMachine. Did it ever work out?
Be30361bb0b0c495e3077db43ad84b56?d=identicon&s=25 Aaron Patterson (Guest)
on 2008-10-03 17:11
(Received via mailing list)
On Fri, Oct 03, 2008 at 11:42:03PM +0900, hemant wrote:
> > submitted.  Mechanize also keeps track of the sites that you have visited as
> > a history.
> >
>
> I saw some of yours posts about running Mechanize on top of
> EventMachine. Did it ever work out?

Not yet.  It's still on my mind, I just haven't had time to make it
work!  Right now I'm focusing on html parsing and javascript support.
E31f2af2c1f5cde7eff16cafe6fc2d39?d=identicon&s=25 Mark Gallop (Guest)
on 2008-10-17 16:49
(Received via mailing list)
Aaron Patterson wrote:
> mechanize version 0.8.4 has been released

I am getting much use out of mechanize. Thanks for your work!

Cheers,
Mark
Be30361bb0b0c495e3077db43ad84b56?d=identicon&s=25 Aaron Patterson (Guest)
on 2008-10-18 05:31
(Received via mailing list)
On Fri, Oct 17, 2008 at 11:48:11PM +0900, Mark Gallop wrote:
> Aaron Patterson wrote:
>> mechanize version 0.8.4 has been released
>
> I am getting much use out of mechanize. Thanks for your work!

Thanks!  You're welcome!
4828d528e2e46f7c8160c336eb332836?d=identicon&s=25 Robert Heiler (shevegen)
on 2008-10-18 21:28
> I am getting much use out of mechanize. Thanks for your work!

Same here :)

And the documentation + examples are really fine.
2fce3b5a094cd28a0538bc4b314d1c09?d=identicon&s=25 Han Holl (Guest)
on 2008-10-21 13:25
(Received via mailing list)
On Fri, Oct 3, 2008 at 8:27 AM, Aaron Patterson
<aaron@tenderlovemaking.com>wrote:

> mechanize version 0.8.4 has been released!
>
> Hi Aaron,

I've got a smallish patch for
www/mechanize/chain/response_body_parser.rb.
Where/how can I submit it. Found nothing on either website.

And I have some issues with Hpricot, so I would like to try* *nokogiri.
Gem install nokogiri didn't work. Then got the git repository.
gem build nokogiri.gemspec didn't work either:
No such file or directory - lib/nokogiri/css/generated_parser.rb

Finally I tried:
gem install nokogiri-0.0.0.20081001111445.gem
ERROR:  could not find gem nokogiri-0.0.0.20081001111445.gem locally or
in a
repository


Any suggestions ?

Han Holl
Be30361bb0b0c495e3077db43ad84b56?d=identicon&s=25 Aaron Patterson (Guest)
on 2008-10-22 08:20
(Received via mailing list)
Hi Han,

On Tue, Oct 21, 2008 at 08:23:44PM +0900, Han Holl wrote:
> On Fri, Oct 3, 2008 at 8:27 AM, Aaron Patterson
> <aaron@tenderlovemaking.com>wrote:
>
> > mechanize version 0.8.4 has been released!
> >
> > Hi Aaron,
>
> I've got a smallish patch for www/mechanize/chain/response_body_parser.rb.
> Where/how can I submit it. Found nothing on either website.

You can submit it via the mechanize rubyforge tracker here:

  http://rubyforge.org/tracker/?group_id=1453

Or you can fork my repository and send a pull request at github:

  http://github.com/tenderlove/mechanize/tree/master


>
> Any suggestions ?

Yes.  Unfortunately you have to install a couple dependencies.  First
install racc which is available here:

  http://i.loveruby.net/en/projects/racc/

And install frex

  % sudo gem install aaronp-frex -s http://gems.github.com

I realize that is kind of a pain in the butt, so I've posted a
development version of the gem on my internet homesite.  Just download
the gem from here:

  http://tenderlovemaking.com/nokogiri-0.0.0.2008102...

Hope that helps!
2fce3b5a094cd28a0538bc4b314d1c09?d=identicon&s=25 Han Holl (Guest)
on 2008-10-22 11:33
(Received via mailing list)
On Wed, Oct 22, 2008 at 8:18 AM, Aaron Patterson
<aaron@tenderlovemaking.com
> wrote:

>
>
> You can submit it via the mechanize rubyforge tracker here:
>
>  http://rubyforge.org/tracker/?group_id=1453


Ok. Did that.

>
-s no longer works with gem. Sould be --source


>
> I realize that is kind of a pain in the butt, so I've posted a
> development version of the gem on my internet homesite.  Just download
> the gem from here:
>
>  http://tenderlovemaking.com/nokogiri-0.0.0.2008102...
>
> gem install  nokogiri-0.0.0.20081021110113.gem
produced:
No definition for owned_eh
(twice)

Unfortunately, it doesn't work at all. And even more unfortunately, it's
not
easy for me to debug, because while 'pp page.parser' in the Hpricot case
gives a detailed result from the parsing process, it just gives:
#<Nokogiri::HTML::Document:0x7f06c01d3260
 @decorators={"node"=>[], "nodeset"=>[]}>
in the nokogiri version.

I have distilled a small example, without too many dependencies:
#!/usr/bin/ruby -w

require 'rubygems'
if ENV['NOKOGIRI']
  require 'nokogiri'
end
require 'mechanize'

if ENV['NOKOGIRI']
  WWW::Mechanize.html_parser = Nokogiri::HTML
end

class ImdbScraper
  def initialize
    @agent = WWW::Mechanize.new { |agent|
      agent.user_agent_alias = 'Linux Mozilla'
    }
    @baseurl = 'http://www.imdb.com'
    page = @agent.get(@baseurl)
    @search = page.form('find')
  end
  def search(lookfor, year = nil)
    @search.q = lookfor
    page = @agent.submit(@search)
  end
end
s = ImdbScraper.new
page = s.search('The Catered Affair', '1956')
puts page.at('//div.info')

# end-of-program

Run with and without the NOKOGIRI environment variable set, and see the
difference.
Maybe I'm missing something else that is silently ignored ?

Cheers,

Han Holl
This topic is locked and can not be replied to.