How to scrape a table that loads with JavaScript
Tables built by JavaScript do not exist in the raw HTML, so IMPORTHTML, Excel Get Data From Web and simple requests scripts often return nothing. A Chrome extension reads the page after it renders: wait for the rows to appear, then run LightCube Data Extractor Tables mode and export.
Do this in one click with LightCube Data Extractor, a free Chrome extension. No account needed.
Add to Chrome, free ↗Step by step
- Open the page and wait until the rows are visible.
- Apply any filters or sorting you want on the site first.
- Run Extract Tables and select the table.
- Export CSV or Copy.
How to tell a table is JavaScript-rendered
Press Ctrl+U (View Source) and search for a value you can see in the table. If it is not in the source, the table is built by script.
Code alternative
Developers use a headless browser such as Playwright to render first, then parse. It is more setup but repeatable:
from playwright.sync_api import sync_playwright
import pandas as pd, io
with sync_playwright() as p:
b = p.chromium.launch(); pg = b.new_page(); pg.goto(URL)
pg.wait_for_selector("table")
df = pd.read_html(io.StringIO(pg.content()))[0]
Div grids
Some script-built grids are divs, not tables. Use CSS Selector mode with the cell class, see when no table is found.
FAQ
- Why does IMPORTHTML return empty?
- Google fetches the raw HTML, which does not contain script-built rows.
- Does the extension wait automatically?
- Run it after the rows are visible.
- Are filters I applied respected?
- Yes, it reads what is on the page at that moment.
Related guides
Updated 2026-11-11.