{"id":19414855,"url":"https://github.com/fcannizzaro/ksoup","last_synced_at":"2026-03-04T04:00:59.345Z","repository":{"id":41322226,"uuid":"101414786","full_name":"fcannizzaro/ksoup","owner":"fcannizzaro","description":"Kotlin Wrapper for Jsoup","archived":false,"fork":false,"pushed_at":"2017-09-02T21:01:59.000Z","size":283,"stargazers_count":61,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-03T04:33:18.637Z","etag":null,"topics":["jsoup","kotlin-android","kotlin-library","pojo","scraping"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fcannizzaro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-25T14:58:40.000Z","updated_at":"2024-01-12T17:56:24.000Z","dependencies_parsed_at":"2022-08-26T06:22:31.377Z","dependency_job_id":null,"html_url":"https://github.com/fcannizzaro/ksoup","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/fcannizzaro/ksoup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcannizzaro%2Fksoup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcannizzaro%2Fksoup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcannizzaro%2Fksoup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcannizzaro%2Fksoup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fcannizzaro","download_url":"https://codeload.github.com/fcannizzaro/ksoup/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcannizzaro%2Fksoup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30071670,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T03:25:38.285Z","status":"ssl_error","status_checked_at":"2026-03-04T03:25:05.086Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["jsoup","kotlin-android","kotlin-library","pojo","scraping"],"created_at":"2024-11-10T12:40:03.941Z","updated_at":"2026-03-04T04:00:59.316Z","avatar_url":"https://github.com/fcannizzaro.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ksoup\nKotlin Wrapper for **Jsoup** using *Pojo* and *Delegated Properties*\n\n[![](https://jitpack.io/v/fcannizzaro/ksoup.svg)](https://jitpack.io/#fcannizzaro/ksoup)\n[![Build Status](https://travis-ci.org/fcannizzaro/ksoup.svg?branch=master)](https://travis-ci.org/fcannizzaro/ksoup)\n\n![](https://raw.githubusercontent.com/fcannizzaro/ksoup/master/icon.png)\n\n# Gradle Dependency\n\n## Step 1.\nAdd the JitPack repository to your build file\n```gradle\nallprojects {\n  repositories {\n    ...\n    maven { url 'https://jitpack.io' }\n  }\n}\n```\n\n## Step 2.\nAdd the dependency\n```gradle\ndependencies {\n  compile 'com.github.fcannizzaro:ksoup:1.0.4'\n}\n```\n\n# Usage\n\n```kotlin\n\nval html = Jsoup.connect(\"https://www.npmjs.com/\").get()\nval ksoup = Ksoup(html)\n\n/*\n*  Scrape!\n*/\n\nval npm : NPM = ksoup.from(html, NPM())\n\n// or\n\nval packages: List\u003cPackage\u003e = ksoup.fromList(html, Package())\n\n```\n\nSee [Sample Code](https://github.com/fcannizzaro/ksoup/tree/master/app/src/main/java/com/fcannizzaro/ksoup/sample)\n\n# Model\n\n## IKsoup([query: String])\n\n### afterBind\nmethod called after object binding is completed.\n\n```kotlin\nclass Package : IKsoup(\".item\") {\n\n  // properties\n\n  override fun afterBind() {\n    // called after object binding is completed.\n  }\n\n}\n```\n\n# Delegated Methods\n\n**trim** param is always **true**\n\n## bindText(query: String, [trim: Boolean]) : String?\n```kotlin\nval title by bindText(\"head \u003e title\")\n```\n\n## bindImage(query: String, [trim: Boolean]) : String?\n```kotlin\nval image by bindImage(\".icon\")\n```\n\n## bindLink(query: String, [trim: Boolean]) : String?\n```kotlin\nval link by bindLink(\"a\")\n```\n\n## bindAttr(query: String, attr: String | KAttr, [trim: Boolean]) : String?\n```kotlin\nval checked by bindAttr(\"form \u003e checkbox\", KAttr.checked)\n```\n\n## \u003cT\u003e bindList(clazz: IKsoup) : List\u003cT\u003e\n```kotlin\nval items : List\u003cPackage\u003e by bindList(Package())\n```\n\n## \u003cT\u003e bindClass(clazz: IKsoup, parent: IKsoup) : T\n```kotlin\nclass Package : IKsoup(\".item\") {\n\n  class Info : IKsoup(\".subitem\") {\n    // Info properties\n  }\n\n  // Package properties\n\n  val info: Info by bindClass(Info(), this)\n\n}\n```\n\n# Author\nFrancesco Saverio Cannizzaro (**fcannizzaro**)\n\n# License\n```\nCopyright 2017 Francesco Saverio Cannizzaro\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffcannizzaro%2Fksoup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffcannizzaro%2Fksoup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffcannizzaro%2Fksoup/lists"}