Elarc Toon: Skip responses that do not start with "text/html" (#2462)
* Elarc Toon: Skip responses that do not start with "text/html" * Update build.gradle * format
This commit is contained in:
parent
4c13971c15
commit
597f1ad8d1
|
@ -3,7 +3,7 @@ ext {
|
|||
extClass = '.ElarcPage'
|
||||
themePkg = 'mangathemesia'
|
||||
baseUrl = 'https://elarctoons.com'
|
||||
overrideVersionCode = 5
|
||||
overrideVersionCode = 6
|
||||
isNsfw = false
|
||||
}
|
||||
|
||||
|
|
|
@ -52,6 +52,12 @@ class ElarcPage : MangaThemesia(
|
|||
|
||||
// Always update URL
|
||||
val response = chain.proceed(request)
|
||||
|
||||
// Skip responses that do not start with "text/html"
|
||||
if (response.header("content-type")?.startsWith("text/html") != true) {
|
||||
return response
|
||||
}
|
||||
|
||||
val document = Jsoup.parse(
|
||||
response.peekBody(Long.MAX_VALUE).string(),
|
||||
request.url.toString(),
|
||||
|
|
Loading…
Reference in New Issue