# Scrape table data inside an Iframe

**URL:** <https://forum.seocontentmachine.com/t/scrape-table-data-inside-an-iframe/288>\
**Category:** workflow\
**Tags:** dynamic-scraper\
**Created:** [May 22, 2024, 2:08pm UTC](https://forum.seocontentmachine.com/t/scrape-table-data-inside-an-iframe/288 "2024-05-22T14:08:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tim](https://forum.seocontentmachine.com/user_avatar/forum.seocontentmachine.com/tim/32/486_2.png) [@Tim](https://forum.seocontentmachine.com/u/Tim)\
**Post date:** [May 22, 2024, 2:08pm UTC](https://forum.seocontentmachine.com/t/scrape-table-data-inside-an-iframe/288/1 "2024-05-22T14:08:19Z")

</div>

Target example:

> [Map of worldwide ransomware attacks (updated daily) - Comparitech](https://www.comparitech.com/blog/information-security/global-ransomware-attacks/)

## 1. Find table

Extract table data from the following

 ![image](https://forum.seocontentmachine.com/uploads/default/original/1X/03f0b71e8831074a16bfbd5706a790e878966c94.png)

Enable Picker

Select Table

 ![image](https://forum.seocontentmachine.com/uploads/default/original/1X/3e1a7247e1295529700efd9e34009c667a9f70c0.png)

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

 ![image](https://forum.seocontentmachine.com/uploads/default/original/1X/2c2eb8784a9fba3392a9e44218104881195ad6a4.png)

Table is inside Iframe

Selector can’t select items in an Iframe

Find Iframe src

> src=“[https://datawrapper.dwcdn.net/gYM1o/36/](https://datawrapper.dwcdn.net/gYM1o/36/)”

Open [https://datawrapper.dwcdn.net/gYM1o/36/](https://datawrapper.dwcdn.net/gYM1o/36/) inside Dynamic scraper

 ![image](https://forum.seocontentmachine.com/uploads/default/original/1X/7b579bcda14ce31ee990778d540bbf2bb5379370.png)

Selection working

## 3. Selecting Table columns

Add blank selection

 ![image](https://forum.seocontentmachine.com/uploads/default/original/1X/870c3994ed34ef5bd74bb9d639c8ac6457a04557.png)

Enter selector

> td:nth-child(2)

 ![image](https://forum.seocontentmachine.com/uploads/default/original/1X/e928d8ea8c516d61d28e3c7a1cf3a0e4eb43e263.png)

CSS code for select column number 2

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

Verify data via CSV table

 ![image](https://forum.seocontentmachine.com/uploads/default/original/1X/cb6e3887c9f14b54cc982a5fe10ecab9988e497e.png)

Select next column

Duplicate selector

![image](https://forum.seocontentmachine.com/uploads/default/optimized/1X/4b712b4c571050bdfc4cfcfa3e3c1efd51689584_2_690x60.png)

Keep adding additional columns

 ![image](https://forum.seocontentmachine.com/uploads/default/original/1X/a63334c9d87fd9e5957c020d9e20ae9a80fa3ee8.png)

## Limitations

The next page button doesn’t change url of page

![image](https://forum.seocontentmachine.com/uploads/default/original/1X/91569731dbfe47497cd068f20ad89196ea40c1c6.png)

Data is being loaded and stored in memory

Dynamic page can only grab the first page of results

## Project

[iframe table.zip](https://forum.seocontentmachine.com/uploads/short-url/j6gKCegcXxT25r0CFMPTumBY2Ys.zip) (1.4 KB)
