https://github.com/drewcarlson/ktsoup
A Kotlin multiplatform HTML5 parsing library
https://github.com/drewcarlson/ktsoup
jsoup kotlin kotlin-multiplatform lexbor web-scraping
Last synced: 11 days ago
JSON representation
A Kotlin multiplatform HTML5 parsing library
- Host: GitHub
- URL: https://github.com/drewcarlson/ktsoup
- Owner: DrewCarlson
- License: apache-2.0
- Created: 2023-07-30T08:03:47.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-17T11:44:47.000Z (17 days ago)
- Last Synced: 2025-04-18T02:01:04.726Z (16 days ago)
- Topics: jsoup, kotlin, kotlin-multiplatform, lexbor, web-scraping
- Language: Kotlin
- Homepage: https://drewcarlson.github.io/KtSoup/latest/
- Size: 1.73 MB
- Stars: 35
- Watchers: 2
- Forks: 0
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# KtSoup


[](https://codecov.io/gh/DrewCarlson/KtSoup)A multiplatform HTML5 parsing library built on [Lexbor](https://github.com/lexbor/lexbor), [Jsoup](https://jsoup.org/), and [node-html-parser](https://github.com/taoqf/node-html-parser).
### [Documentation](https://drewcarlson.github.io/KtSoup/latest/)
### [API Docs](https://drewcarlson.github.io/KtSoup/latest/kdoc/)## Usage
```kotlin
val documentString = """
Hello World
"""
val document = KtSoupParser.parse(documentString)
document.use { document ->
val div = document.querySelector("#test")
println(div.textContent()) // Hello World
println(div.html()) //Hello World
}```
## Download
[](https://search.maven.org/search?q=g:org.drewcarlson%20a:ktsoup-*)






```kotlin
repositories {
mavenCentral()
// Or snapshots
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/")
}dependencies {
implementation("org.drewcarlson:ktsoup-core:$VERSION")
implementation("org.drewcarlson:ktsoup-fs:$VERSION")
implementation("org.drewcarlson:ktsoup-ktor:$VERSION")
}
```Toml (Click to expand)
```toml
[versions]
ktsoup = "1.0.0-SNAPSHOT"[libraries]
ktsoup-core = { module = "org.drewcarlson:ktsoup-core", version.ref = "ktsoup" }
ktsoup-fs = { module = "org.drewcarlson:ktsoup-fs", version.ref = "ktsoup" }
ktsoup-ktor = { module = "org.drewcarlson:ktsoup-ktor", version.ref = "ktsoup" }
```### License
This project is licensed under Apache-2.0, found in [LICENSE](LICENSE).