Fix thumbnails not loading at YesMangás. (#4472)

Fix thumbnails not loading at YesMangás
This commit is contained in:
Alessandro Jean 2020-09-30 13:03:59 -03:00 committed by GitHub
parent 2ef94affe4
commit d93f0ba1b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -5,7 +5,7 @@ ext {
extName = 'YES Mangás' extName = 'YES Mangás'
pkgNameSuffix = 'pt.yesmangas' pkgNameSuffix = 'pt.yesmangas'
extClass = '.YesMangas' extClass = '.YesMangas'
extVersionCode = 4 extVersionCode = 5
libVersion = '1.2' libVersion = '1.2'
} }

View File

@ -119,7 +119,7 @@ class YesMangas : ParsedHttpSource() {
private fun String.withoutLanguage(): String = replace(LANG_REGEX, "") private fun String.withoutLanguage(): String = replace(LANG_REGEX, "")
private fun String.toLargeUrl(): String = replace(IMAGE_REGEX, ".") private fun String.toLargeUrl(): String = replace(IMAGE_REGEX, "_full.")
private fun Elements.textWithoutLabel(): String = text()!!.substringAfter(":").trim() private fun Elements.textWithoutLabel(): String = text()!!.substringAfter(":").trim()
@ -130,7 +130,8 @@ class YesMangas : ParsedHttpSource() {
} }
companion object { companion object {
private const val USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36" private const val USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) " +
"AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36"
private val LANG_REGEX = "( )?\\((PT-)?BR\\)".toRegex() private val LANG_REGEX = "( )?\\((PT-)?BR\\)".toRegex()
private val IMAGE_REGEX = "_(small|medium|xmedium|xlarge)\\.".toRegex() private val IMAGE_REGEX = "_(small|medium|xmedium|xlarge)\\.".toRegex()