From: Marcin Raczkowski Date: 2008-02-04T09:05:55+09:00 Subject: Re: mechanize get methods returns both ::File and ::Page You have to set plugable paraser for text/plain to html parser here's hack (you'll have to change get to get_html): class WWW::Mechanize def get_html(url) old_parser= @pluggable_parser['text/plain'] @pluggable_parser['text/plain']=@pluggable_parser['text/html'] bdy = get(url) pluggable_parser['text/plain']=old_parser bdy end end and other way around (always get file for html) class WWW::Mechanize def get_file(url) old_parser= @pluggable_parser['text/html'] @pluggable_parser['text/html']=::WWW::Mechanize::File bdy = get(url).body pluggable_parser['text/html']=old_parser bdy end end