File tree Expand file tree Collapse file tree
KuramanimeProvider/src/main/kotlin/com/hexated Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ class KuramanimeProvider : MainAPI() {
7272
7373 override suspend fun getMainPage (page : Int , request : MainPageRequest ): HomePageResponse {
7474 val document = app.get(request.data + page).document
75- val home = document.select(" div#animeList div .product__item" ).mapNotNull {
75+ val home = document.select(" div.product__item" ).mapNotNull {
7676 it.toSearchResult()
7777 }
7878 return newHomePageResponse(request.name, home)
@@ -90,8 +90,9 @@ class KuramanimeProvider : MainAPI() {
9090 val href = getProperAnimeLink(fixUrl(this .selectFirst(" a" )!! .attr(" href" )))
9191 val title = this .selectFirst(" h5 a" )?.text() ? : return null
9292 val posterUrl = fixUrl(this .select(" div.product__item__pic.set-bg" ).attr(" data-setbg" ))
93+
9394 val episode = this .select(" div.ep span" ).text().let {
94- Regex (" Ep \\ s(\\ d+)\\ s/ " ).find(it)?.groupValues?.getOrNull(1 )?.toIntOrNull()
95+ Regex (" (?i)ep \\ s* (\\ d+)" ).find(it)?.groupValues?.getOrNull(1 )?.toIntOrNull()
9596 }
9697
9798 return newAnimeSearchResponse(title, href, TvType .Anime ) {
@@ -101,7 +102,7 @@ class KuramanimeProvider : MainAPI() {
101102 }
102103
103104 override suspend fun search (query : String ): List <SearchResponse > {
104- return app.get(" $mainUrl /anime?search=$query &order_by=latest" ).document.select(" div#animeList div .product__item" ).mapNotNull {
105+ return app.get(" $mainUrl /anime?search=$query &order_by=latest" ).document.select(" div.product__item" ).mapNotNull {
105106 it.toSearchResult()
106107 }
107108 }
You can’t perform that action at this time.
0 commit comments