Skip to content

Commit eddc615

Browse files
committed
add dynamic content info
1 parent 3cf3942 commit eddc615

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
### Single Page Applications (SPAs)
2+
3+
When scraping a Single Page Application (SPA) with dynamic content, you must ensure the page has fully loaded. To do this, you have two main options:
4+
5+
:::note
6+
1. Use `waitForSelector` to wait for a specific element to appear on the page. This is often the most reliable and efficient method.
7+
2. Use `goToOptions` with "networkidle0" or "networkidle2"
8+
- `"networkidle0"` waits for all network connections to be idle, meaning all resources (including asynchronous JavaScript) have been loaded
9+
- `"networkidle2"` is a more efficient alternative that waits until there are only two or fewer ongoing network connections
10+
:::

0 commit comments

Comments
 (0)