Anitubeinua: fix recommendations

This commit is contained in:
CakesTwix 2023-02-21 10:10:20 +02:00
parent 271914c8c4
commit 80bd628516
Signed by: CakesTwix
GPG key ID: 7B11051D5CE19825

View file

@ -42,9 +42,9 @@ class AnitubeinuaProvider : MainAPI() {
} }
private fun Element.toSearchResponse(): SearchResponse { private fun Element.toSearchResponse(): SearchResponse {
val title = this.selectFirst(".story_c h2 a")?.text()?.trim().toString() val title = this.selectFirst(".story_c h2 a, div.text_content a")?.text()?.trim().toString()
val href = this.selectFirst(".story_c h2 a")?.attr("href").toString() val href = this.selectFirst(".story_c h2 a, div.text_content a")?.attr("href").toString()
val posterUrl = mainUrl + this.selectFirst(".story_c_l span.story_post img")?.attr("src") val posterUrl = mainUrl + this.selectFirst(".story_c_l span.story_post img, a img")?.attr("src")
return newMovieSearchResponse(title, href, TvType.Anime) { return newMovieSearchResponse(title, href, TvType.Anime) {
this.posterUrl = posterUrl this.posterUrl = posterUrl
@ -84,7 +84,7 @@ class AnitubeinuaProvider : MainAPI() {
// val author = someInfo.select("strong:contains(Студія:)").next().html() // val author = someInfo.select("strong:contains(Студія:)").next().html()
val rating = document.selectFirst(".lexington-box > div:last-child span")?.text().toRatingInt() val rating = document.selectFirst(".lexington-box > div:last-child span")?.text().toRatingInt()
val recommendations = document.select(".horizontal ul").map { val recommendations = document.select(".horizontal ul li").map {
it.toSearchResponse() it.toSearchResponse()
} }