The Table Type of ScrapeMap allows users to quickly scrape data in a HTML table. In this example let’s target the market data available through Yahoo Finance for web scraping.
We must browse to the data we want to scrape before we can create the ScrapeMap. Type “yahoo finance” into the Navigation Bar and press enter to search.
Click on the first result for Yahoo Finance. Let’s get the data for the top 30 NASDAQ components. Click on the “NASDAQ” link at the top of Yahoo Finance. Now click on the “Components” tab to get to the top 30 NASDAQ components.
Now that we’re at the data we want to scrape click the Create ScrapeMap button in the ScrapeMap toolbar.
In the Create New ScrapeMap Dialog specify the File Path of the ScrapeMap you would like to create. For Type Of ScrapeMap select “Table”. Enable “Add Date Updated Field”. Set Create New Or Update Existing Table to UpdateExistingTable. Set Write To “Excel”. If you don’t have a version of Excel installed on your machine you can Write To a CSV file. Specify the Excel Table Name and Excel File Path. Click OK to create the Table ScrapeMap.
To create the DataAddresses or your Table ScrapeMap just click anywhere in the HTML Table. If you get an error message try clicking somewhere else in the table. If this fails it’s possible that you aren’t dealing with an HTML table.
In the ScrapeMap Follow-up Wizard pane you will see the headers and data for the table that you selected. Because the headers in this table will become the DataAddress names they cannot contain spaces or special characters. ScrapeMate automatically removes these from the HTML table headers. If you would like to have different headers you should rename them here. Let’s rename the first header from “Symbol” to “StockSymbol”.
After clicking OK you should see one Data Address per column with the target data highlighted in green and visible in the Data Preview pane.
Save the ScrapeMap and run it to test that the target data is being properly scraped. If you would like to schedule automatic future ScrapeMap runs at a specific interval you can find more information about this in the Tutorials and Help documentation about create a ScrapeMap Task.