I browsed the documentation Mechanize. The below is for .pdf
only.
require 'mechanize'
agent = Mechanize.new
agent.pluggable_parser.pdf = Mechanize::FileSaver
agent.get 'http://example.com/foo.pdf'
- But can I also download .docx,.xlsx,.txt file also?
- when the file download will be done,what would be it's default directory? Can we change the save file directory too?
- which browser would it select during downloading? Can we also change the browser control?