Last active
December 17, 2021 10:47
-
-
Save nyancodeid/c6f5fc4eba26aac1b1efee6b89e8a4be to your computer and use it in GitHub Desktop.
DenoQL Showcase
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
cnn: page(url: "https://www.cnnindonesia.com/") { | |
international_news: query(selector: "a.gtm_navbar_internasional") { | |
data: parent { | |
news: queryAll(selector: "article") { | |
title: text(selector: "h2.title") | |
thumbnail: src(selector: "img") | |
link: href(selector: "a") | |
detail: query(selector: "a") { | |
meta: visit { | |
keywords: attr(selector: "meta[name='keywords']", name: "content") | |
description: attr(selector: "meta[name='description']", name: "content") | |
} | |
} | |
} | |
} | |
} | |
technology_news: query(selector: "a.gtm_navbar_teknologi") { | |
data: parent { | |
news: queryAll(selector: "article") { | |
title: text(selector: "h2.title") | |
thumbnail: src(selector: "img") | |
link: href(selector: "a") | |
detail: query(selector: "a") { | |
meta: visit { | |
keywords: attr(selector: "meta[name='keywords']", name: "content") | |
description: attr(selector: "meta[name='description']", name: "content") | |
} | |
} | |
} | |
} | |
} | |
sport_news: query(selector: "a.gtm_navbar_olahraga") { | |
data: parent { | |
news: queryAll(selector: "article") { | |
title: text(selector: "h2.title") | |
thumbnail: src(selector: "img") | |
link: href(selector: "a") | |
detail: query(selector: "a") { | |
meta: visit { | |
keywords: attr(selector: "meta[name='keywords']", name: "content") | |
description: attr(selector: "meta[name='description']", name: "content") | |
} | |
} | |
} | |
} | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
detik: page(url: "https://inet.detik.com/") { | |
articles: queryAll(selector: "article.list-content__item.article_inview") { | |
title: attr(selector: ".media__image > a", name: "dtr-ttl") | |
link: attr(name: "i-link") | |
details: visit_custom(name: "i-link") { | |
thumbnail: meta(name: "thumbnailUrl") | |
description: meta(name: "description") | |
keywords: meta(name: "keywords") | |
author: meta(name: "author") | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment