Scrape table data inside an Iframe

Target example:

Map of worldwide ransomware attacks (updated daily) - Comparitech

1. Find table

Extract table data from the following

Enable Picker

Select Table

Problem with selection

Unable to select individual elements of table

Only able to select entire table

2. Troubleshoot selection error

Open site inside native web browser

Open Dev Tools (F12)

Investigate table

Table is inside Iframe

Selector can’t select items in an Iframe

Find Iframe src

src=“https://datawrapper.dwcdn.net/gYM1o/36/

Open https://datawrapper.dwcdn.net/gYM1o/36/ inside Dynamic scraper

Selection working

3. Selecting Table columns

Add blank selection

Enter selector

td:nth-child(2)

CSS code for select column number 2

Columns 0, 1 do not return any data in this table

Verify data via CSV table

Select next column

Duplicate selector

Keep adding additional columns

Limitations

The next page button doesn’t change url of page

Data is being loaded and stored in memory

Dynamic page can only grab the first page of results

Project

iframe table.zip (1.4 KB)