Re:Ferret – Declarative web scraping
by mbel on Tuesday October 02, 2018 @02:43PM
(#18124454)
The flow in the example is simple: click -> wait -> process result; but it's still there. Notice that instructions are executed in the order they are defined, that is enough to make it imperative.
[ Parent
| on HN ]
Re:Ferret – Declarative web scraping
by bryanrasmussen on Tuesday October 02, 2018 @02:51PM
(#18124536)
yes but I think it could be made truly declarative with very little work.
take out the waits, and maybe not carry around the doc all over the place - the context of the page being processed should be figured out by the interpreter.
on edit: although the web interfaces being what they are some things need to be order dependent - like INPUT(google, 'input[name="q"]', "ferret") CLICK(google, 'input[name="btnK"]'), I mean you need to click the button after you fill out the input.