All Downloads are FREE. Search and download functionalities are using the official Maven repository.

it.skrape.core.Scraper.kt Maven / Gradle / Ivy

Go to download

skrape{it} is a Kotlin-based HTML testing and web scraping library that can be used seamlessly in both Spring-Boot and other JVM projects. It places particular emphasis on ease of use, a high level of readability and attention to performance through the use of non-blocking operations.

The newest version!
package it.skrape.core

import it.skrape.core.fetcher.BrowserFetcher
import it.skrape.core.fetcher.HttpFetcher
import org.jsoup.nodes.Document


class Scraper(val request: Request = Request()) {

    fun scrape(): Result {
        return when (request.mode) {
            Mode.BROWSER -> BrowserFetcher(request).fetch()
            Mode.HTTP -> HttpFetcher(request).fetch()
        }
    }
}

typealias Doc = Document





© 2015 - 2025 Weber Informatics LLC | Privacy Policy