With PlaceholderTransformer
you can achieve more dynamic query
val page = Page("https://twitter.com/{{USERNAME}}/likes") {
query("td {{TAG}}") {
"title" to text()
}
}
val transformer = PlaceholderTransformer(mapOf(
"USERNAME" to "esafirm",
"TAG" to "a"
))
// {{USERNAME}} will be replaced by "esafirm" and {{TAG}} with "a"
val transformedPage = transformer.transform(page)