mirror of
https://github.com/MontFerret/ferret.git
synced 2024-12-14 11:23:02 +02:00
71c246dd17
* Added KeepCookies option to CDP driver * Added LoadDocumentParams * Added COOKIE_GET and COOKIE_SET methods
15 lines
536 B
Plaintext
15 lines
536 B
Plaintext
LET doc = DOCUMENT('https://www.theverge.com/tech', {
|
|
driver: "cdp"
|
|
})
|
|
WAIT_ELEMENT(doc, '.c-compact-river__entry', 5000)
|
|
LET articles = ELEMENTS(doc, '.c-entry-box--compact__image-wrapper')
|
|
LET links = (
|
|
FOR article IN articles
|
|
RETURN article.attributes.href
|
|
)
|
|
FOR link IN links
|
|
// The Verge has pretty heavy pages, so let's increase the navigation wait time
|
|
NAVIGATE(doc, link, 20000)
|
|
WAIT_ELEMENT(doc, '.c-entry-content', 5000)
|
|
LET texter = ELEMENT(doc, '.c-entry-content')
|
|
RETURN texter.innerText |