Hentai cafe url fix (#5233)

* Remove suffixed <br /> for some parsed URLs

* Bump version code
This commit is contained in:
vaginadesolator 2020-12-22 21:12:07 +08:00 committed by GitHub
parent 209db287a3
commit b8ef369928
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'FoolSlide (multiple sources)'
pkgNameSuffix = 'all.foolslide'
extClass = '.FoolSlideFactory'
extVersionCode = 55
extVersionCode = 56
libVersion = '1.2'
containsNsfw = true
}

View File

@ -63,7 +63,9 @@ class HentaiCafe : FoolSlide("Hentai Cafe", "https://hentai.cafe", "en", "/manga
// Example: https://hentai.cafe/aiya-youngest-daughters-circumstances/
override fun chapterListParse(response: Response) = listOf(
SChapter.create().apply {
setUrlWithoutDomain(response.asJsoup().select("[title=Read]").attr("href"))
// Some URLs wrongly end with "<br />\n" and need to be removed
// Example: https://hentai.cafe/hc.fyi/12106
setUrlWithoutDomain(response.asJsoup().select("[title=Read]").attr("href").replace("<br />\\s*".toRegex(), ""))
name = "Chapter"
chapter_number = 1f
}