I have captured a Mechanize page. How can I get that item into a string? Pretty Print is used to output that object, however I'd like to get that into a string for further instructions. I can't seem to find any method.
Any advice appreciated.
Cheers
Never needed to save the page content to a string but this works:
require 'mechanize'
agent = Mechanize.new
page = agent.get("http://www.google.com")
s = page.content
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With