{"id":18427487,"url":"https://github.com/t-fowl/ktor-jsoup","last_synced_at":"2025-04-07T16:33:27.077Z","repository":{"id":38238247,"uuid":"188230676","full_name":"T-Fowl/ktor-jsoup","owner":"T-Fowl","description":"Ktor client feature for un-marshalling into Jsoup's Document class","archived":false,"fork":false,"pushed_at":"2024-08-18T05:10:12.000Z","size":1006,"stargazers_count":14,"open_issues_count":11,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-08-18T06:28:45.080Z","etag":null,"topics":["html","jsoup","kotlin","ktor","rss","xml"],"latest_commit_sha":null,"homepage":"https://t-fowl.github.io/ktor-jsoup/","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/T-Fowl.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-23T12:33:49.000Z","updated_at":"2023-11-19T14:16:17.000Z","dependencies_parsed_at":"2023-09-29T00:40:30.817Z","dependency_job_id":null,"html_url":"https://github.com/T-Fowl/ktor-jsoup","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T-Fowl%2Fktor-jsoup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T-Fowl%2Fktor-jsoup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T-Fowl%2Fktor-jsoup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T-Fowl%2Fktor-jsoup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/T-Fowl","download_url":"https://codeload.github.com/T-Fowl/ktor-jsoup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223286383,"owners_count":17120000,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["html","jsoup","kotlin","ktor","rss","xml"],"created_at":"2024-11-06T05:10:57.354Z","updated_at":"2024-11-06T05:10:57.961Z","avatar_url":"https://github.com/T-Fowl.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ktor: Jsoup\n\n![Build](https://github.com/T-Fowl/ktor-jsoup/workflows/Build/badge.svg)\n![Maven Central](https://img.shields.io/maven-central/v/com.tfowl.ktor/ktor-jsoup)\n![GitHub](https://img.shields.io/github/license/T-Fowl/ktor-jsoup)\n\nThe Jsoup plugin allows you to handle xml and html content in your ktor application easily using the [Jsoup](https://jsoup.org/) library.\n\nThis plugin provides a [HttpClientPlugin](https://ktor.io/docs/http-client-plugins.html) which provides a response transformer for the Jsoup [Document](https://jsoup.org/apidocs/org/jsoup/nodes/Document.html) type.\n\n## Usage\n\nInstall the plugin in your `HttpClient`\n\n```kotlin\ninstall(JsoupPlugin)\n```\n\nYou can optionally configure more content types for Jsoup to parse\n\n```kotlin\ninstall(JsoupPlugin) {\n    parsers[ContentType.Application.Rss] = Parser.xmlParser()\n}\n``` \n\nWith the plugin installed you can receive Documents by using `response.body\u003cDocument\u003e()`.\n\n```kotlin\nHttpClient(engine) {\n    install(JsoupPlugin) {\n        parsers[ContentType.Application.Rss] = Parser.xmlParser()\n    }\n}.use { client -\u003e\n    val feed = client.get(url).body\u003cDocument\u003e()\n}\n```\n\n## Versions\n\nCompatible / Recommended version pairings between `ktor` and `ktor-jsoup`\n\n| ktor     | ktor-jsoup | notes                                |\n|----------|------------|--------------------------------------|\n| `1.5.4+` | `1.5.4`    |                                      |\n| `1.6.3+` | `1.6.4`    |                                      |\n| `2.0.0+` | `2.0.0`    |                                      |\n| `2.3.0+` | `2.3.0`    | Kotlin `1.8.10` binary compatability |\n\n## Download\n\nAdd a gradle dependency to your project:\n\nGroovy\n```groovy\nrepositories {\n    mavenCentral()\n}\nimplementation \"com.tfowl.ktor:ktor-jsoup:$ktorJsoupVersion\"\n// Recommend overriding ktor \u0026 jsoup versions \n```\n\nKotlin DSL\n```kotlin\nrepositories {\n    mavenCentral()\n}\nimplementation(\"com.tfowl.ktor:ktor-jsoup:$ktorJsoupVersion\")\n// Recommend overriding ktor \u0026 jsoup versions\n```\n\nAdd a maven dependency to your project:\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.tfowl.ktor\u003c/groupId\u003e\n  \u003cartifactId\u003ektor-jsoup\u003c/artifactId\u003e\n  \u003cversion\u003e${ktorJsoupVersion}\u003c/version\u003e\n\u003c/dependency\u003e\n\u003c!-- Recommend overriding ktor \u0026 jsoup versions here --\u003e\n```\n\n## License\n\n```\nMIT License\n\nCopyright (c) 2023 Thomas Fowler\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft-fowl%2Fktor-jsoup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ft-fowl%2Fktor-jsoup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft-fowl%2Fktor-jsoup/lists"}