Tutorial 5: Saving Scraped Data to a Database

Saving Scraped Data to a Database

We continue on with our e-commerce site in this tutorial by inserting the data we scrape into a database. Generally once you've extracted data from a web site you want to save it out either to a file or a database. We already went over saving the data to a file in Tutorial 2, so here we'll cover inserting the information into a database.

If you haven't already gone through Tutorial 2, you'll probably want to take some time to do that before continuing on with this tutorial.

If you decided not to go through Tutorial 2, or don't still have the scraping session and scripts you created in it, you can download and load them into screen-scraper by following these steps:

  1. Download the zip file located here and unzip it. You should now have an "interpreted_java" directory and a "vbscript" directory.
  2. If you're running Windows, and prefer to program in VBScript, import the "Shopping Site (Scraping Session).sss" scraping session located in the "vbscript" directory; otherwise, import the one located in the "interpreted_java" directory. You'll also want to import the "Shopping Site--start session (Script).sss" file. Instructions on importing objects into screen-scraper can be found here.

Once you've got the scraping session and script imported into screen-scraper you're ready to roll. Click on the "Tutorial Details" link below to get going.