Tools to Capture and Convert the Web

How do I get the Scraper to save data to a file?

There are two ways you can do this the easiest is to click the "Add New Scrape Instruction" link on the Scrape Instructions tab, to open the wizard. You can then choose the Download Page, option to automatically download each web page into its own file.

The second way to download files in a scrape, is to do it manually. To save simple text to a file in the Scrape Instruction tab, enter the command Data.saveToFile("random text"); this will save the text random text in a file for every page it is executed for. You can also set a file name by specifying the second parameter like so Data.saveToFile(Page.getHtml(), "source.html");

Note that in this example we are now saving all of the current pages HTML to a file. As all files would have the same name the web scraper will automatically append a number to each source.html file name to ensure all web pages are saved.

Back to SupportMore Scraping ArticlesCommunity Scraping Questions
Try all our premium features for free with a 7 day free trial. Then from $5.99 a month, unless cancelled.
  • More Captures
  • More Features
  • More API's
  • Bigger Scrapes
  • Bigger Captures
  • Bigger Everything
Start Free Trial