Mechanize/Nokogiri from file

R

Rowan Udell

i'm playing with Mechanize and Nokogiri, and am have a problem which i
think is fairly basic, but can't find a way around...

i want to be able to serialize/save pages which i am working on in
Mechanize to file, and load them up later on. i can save them easily
enough using WWW::Mechanize::page's (which i get returned from the
WWW::Mechanize::get()) save_as() method, and can see the webpage in the
file, but i can't seem to load it back in to a WWW::Mechanize::page
object later on. i've tried using get() and get_file() methods with
File objects and URI's (ie. 'file://...'), but get 400 responses, or 'no
file exists' errors. what am i missing out?

i just want to be able to load the page from file, and parse/work with
it using WWW::Mechanize::page's links(), forms(), etc. methods.

cheers.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top