Closed wg20170107 closed 3 weeks ago
https://crawl4ai.com/mkdocs/basic/page-interaction/ its specified here
@wg20170107 V8 allows you to pass either a CSS selector or JavaScript that returns true or false. During crawling, if a CSS selector is passed, it waits for the element to be visible. If JavaScript is passed, it runs the script until it returns true before continuing. The following is a sample code using CSS. Note the css:
prefix, which can also be js:
for JavaScript.
result = await crawler.arun(
url="https://example.com",
wait_for="css:.dynamic-content" # Wait for element with class 'dynamic-content'
)
wait_for=".crypto-row:nth-child(20)", # Wait for 20 rows to load what's format of this param