1
0
mirror of https://github.com/MontFerret/ferret.git synced 2025-01-12 03:19:45 +02:00

Update static-page.fql

This commit is contained in:
Tim Voronov 2018-10-07 02:24:29 -04:00 committed by GitHub
parent e3ff06be4d
commit 1db9082085
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,13 @@
LET doc = DOCUMENT('https://news.ycombinator.com/')
LET doc = DOCUMENT("https://github.com/topics")
FOR post IN ELEMENTS(doc, '.storylink')
RETURN post.attributes.href
FOR el IN ELEMENTS(doc, ".py-4.border-bottom")
LIMIT 10
LET url = ELEMENT(el, "a")
LET name = ELEMENT(el, ".f3")
LET desc = ELEMENT(el, ".f5")
RETURN {
name: TRIM(name.innerText),
description: TRIM(desc.innerText),
url: "https://github.com" + url.attributes.href
}