'Using skrape{it} to skrap from a JS driven websites
I have this kotlin code in android studio that I got from the official documentation of skrape{it}
fun main() {
val scrapedData = skrape {
url = "http://some.url"
mode = Mode.DOM // <--- here's the magic
extract {
div {
withClass = "dynamic"
findFirst { text }
}
}
}
println(scrapedData)
}
and it doesn't even run or build.
I added some import
import ch.qos.logback.classic.spi.CallerData.extract
import it.skrape.fetcher.skrape
import org.jsoup.select.Collector.findFirst
I have this error message
None of the following functions can be called with the arguments supplied:
public fun <R, T> skrape(fetcher: BlockingFetcher<TypeVariable(R)>, init: suspend Scraper<TypeVariable(R)>.() -> TypeVariable(T)): TypeVariable(T) defined in it.skrape.fetcher
public suspend fun <R, T> skrape(fetcher: NonBlockingFetcher<TypeVariable(R)>, init: suspend Scraper<TypeVariable(R)>.() -> TypeVariable(T)): TypeVariable(T) defined in it.skrape.fetcher
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
