mirror of
https://github.com/MontFerret/ferret.git
synced 2024-12-14 11:23:02 +02:00
3829dffb91
* adds function to type input * changes per feedback * more PR feedback changes * add context.Background()
21 lines
427 B
Plaintext
21 lines
427 B
Plaintext
LET g = DOCUMENT("https://www.google.com/", true)
|
|
|
|
INPUT(g, 'input[name="q"]', "ferret", 25)
|
|
CLICK(g, 'input[name="btnK"]')
|
|
|
|
WAIT_NAVIGATION(g)
|
|
|
|
LET result = (
|
|
FOR result IN ELEMENTS(g, '.g')
|
|
RETURN {
|
|
title: ELEMENT(result, 'h3 > a'),
|
|
description: ELEMENT(result, '.st'),
|
|
url: ELEMENT(result, 'cite')
|
|
}
|
|
)
|
|
|
|
RETURN (
|
|
FOR i IN result
|
|
FILTER i.title != NONE
|
|
RETURN i
|
|
) |