-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Add dynamic content info #25419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: production
Are you sure you want to change the base?
Add dynamic content info #25419
Conversation
This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:
|
@@ -0,0 +1,11 @@ | |||
### Single Page Applications (SPAs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### Single Page Applications (SPAs) | |
## Scrape a Single Page Applications (SPAs) |
@@ -0,0 +1,11 @@ | |||
### Single Page Applications (SPAs) | |||
|
|||
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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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: | |
To scrape a Single Page Application (SPA) with dynamic content, make sure the page has fully loaded using one of these methods: |
### Single Page Applications (SPAs) | ||
|
||
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: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Recommended: Use `waitForSelector` to wait for a specific element to appear on the page. | |
- Use `goToOptions` with `networkidle0` or `networkidle2`. Between the `networkidle` options, `networkidle2` is more efficient because it waits until there are less than two ongoing network connections, whereas `networkidle0` waits until all network connections are idle and all resources (including asynchronous JavaScript) have loaded. | |
|
||
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: | ||
|
||
:::note |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:::note |
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: | ||
|
||
:::note | ||
Use `waitForSelector` to wait for a specific element to appear on the page. This is often the most reliable and efficient method. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use `waitForSelector` to wait for a specific element to appear on the page. This is often the most reliable and efficient method. |
|
||
:::note | ||
Use `waitForSelector` to wait for a specific element to appear on the page. This is often the most reliable and efficient method. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:::note | ||
Use `waitForSelector` to wait for a specific element to appear on the page. This is often the most reliable and efficient method. | ||
|
||
Use `goToOptions` with `"networkidle0"` or `"networkidle2"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use `goToOptions` with `"networkidle0"` or `"networkidle2"` |
Use `waitForSelector` to wait for a specific element to appear on the page. This is often the most reliable and efficient method. | ||
|
||
Use `goToOptions` with `"networkidle0"` or `"networkidle2"` | ||
- `"networkidle0"` waits for all network connections to be idle, meaning all resources (including asynchronous JavaScript) have been loaded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `"networkidle0"` waits for all network connections to be idle, meaning all resources (including asynchronous JavaScript) have been loaded |
|
||
Use `goToOptions` with `"networkidle0"` or `"networkidle2"` | ||
- `"networkidle0"` waits for all network connections to be idle, meaning all resources (including asynchronous JavaScript) have been loaded | ||
- `"networkidle2"` is a more efficient alternative that waits until there are only two or fewer ongoing network connections |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `"networkidle2"` is a more efficient alternative that waits until there are only two or fewer ongoing network connections |
Use `goToOptions` with `"networkidle0"` or `"networkidle2"` | ||
- `"networkidle0"` waits for all network connections to be idle, meaning all resources (including asynchronous JavaScript) have been loaded | ||
- `"networkidle2"` is a more efficient alternative that waits until there are only two or fewer ongoing network connections | ||
::: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
::: |
@simonabadoiu Sorry for the delay. This didn't auto-assign to me when you submitted it for some reason so I just saw it. Left you some suggestions. Let me know when you're done and I'll approve. Thanks! |
Summary
Screenshots (optional)
Documentation checklist