I wrote a web crawler in Ruby and I'm using Nokogiri::HTML
to parse the page. I need to print the page out and while messing around in IRB I noticed a pretty_print
method. However it takes a parameter and I can't figure out what it wants.
My crawler is caching the HTML of the webpages and writing it to files on my local machine. I would like to "pretty print" the HTML so that it looks nice and properly formatted when I do so.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…