mirror of
https://github.com/MontFerret/ferret.git
synced 2025-01-08 03:13:15 +02:00
e6dd5689b4
* Fixed logger level * Fixed WAITFOR EVENT parser * Added tracing to Network Manager * Updated logging * Swtitched to value type of logger * Added tracing * Increased websocket maximum buffer size * Ignore unimportant error message * Added support of new CDP API for layouts * Switched to value type of logger * Added log level * Fixed early context cancellation * Updated example of 'click' action * Switched to val for elements lookup * Fixed unit tests * Refactored 'eval' module * Fixed SetStyle eval expression * Fixed style deletion * Updated logic of setting multiple styles
18 lines
643 B
Plaintext
18 lines
643 B
Plaintext
LET doc = DOCUMENT("https://github.com/MontFerret/ferret/stargazers", { driver: "cdp" })
|
|
|
|
LET nextSelector = '[data-test-selector="pagination"] .btn:nth-child(2):not([disabled])'
|
|
LET elementsSelector = '#repos ol li'
|
|
|
|
FOR i DO WHILE ELEMENT_EXISTS(doc, nextSelector)
|
|
LIMIT 3
|
|
LET wait = i > 0 ? CLICK(doc, nextSelector) : false
|
|
LET nav = wait ? (WAITFOR EVENT "navigation" IN doc) : false
|
|
|
|
FOR el IN ELEMENTS(doc, elementsSelector)
|
|
FILTER ELEMENT_EXISTS(el, ".octicon-organization")
|
|
|
|
RETURN {
|
|
name: INNER_TEXT(el, 'div > div:nth-child(2) [data-hovercard-type="user"]'),
|
|
company: INNER_TEXT(el, "div > div:nth-child(2) p")
|
|
}
|