Ferret — Go 语言实现的声明式 Web 爬虫系统
Ferret 是一个声明式的 Web 爬虫系统,旨在简化网络上的数据提取,以用于 UI 测试、机器学习和分析等等。 Ferret 拥有自己的声明式语言,通过抽象出技术细节和底层技术的复杂性,从而更专注于数据本身。 特性 声明式语言 支持静态和动态 web 页面 嵌入式 可扩展 示例 LET google = DOCUMENT("https://www.google.com/", true) INPUT(google, 'input[name="q"]', "ferret", 25) CLICK(google, 'input[name="btnK"]') WAIT_NAVIGATION(google) FOR result IN ELEMENTS(google, '.g') // filter out extra elements like videos and 'People also ask' FILTER TRIM(result.attributes.class) == 'g' RETURN { title: INNER_TEXT(result, 'h3'), descriptio...