mirror of
https://github.com/keiyoushi/extensions-source.git
synced 2024-11-25 11:42:47 +01:00
add prazeres violentos (#3154)
* add prazeres violentos * exception message * exception message 2
This commit is contained in:
parent
80a295b5e8
commit
d699a173cf
10
src/pt/prazeresviolentos/build.gradle
Normal file
10
src/pt/prazeresviolentos/build.gradle
Normal file
@ -0,0 +1,10 @@
|
||||
ext {
|
||||
extName = 'Prazeres Violentos'
|
||||
extClass = '.PrazeresViolentos'
|
||||
themePkg = 'madara'
|
||||
baseUrl = 'https://prazeresviolentos.com'
|
||||
overrideVersionCode = 0
|
||||
isNsfw = true
|
||||
}
|
||||
|
||||
apply from: "$rootDir/common.gradle"
|
BIN
src/pt/prazeresviolentos/res/mipmap-hdpi/ic_launcher.png
Normal file
BIN
src/pt/prazeresviolentos/res/mipmap-hdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.8 KiB |
BIN
src/pt/prazeresviolentos/res/mipmap-mdpi/ic_launcher.png
Normal file
BIN
src/pt/prazeresviolentos/res/mipmap-mdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
BIN
src/pt/prazeresviolentos/res/mipmap-xhdpi/ic_launcher.png
Normal file
BIN
src/pt/prazeresviolentos/res/mipmap-xhdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.5 KiB |
BIN
src/pt/prazeresviolentos/res/mipmap-xxhdpi/ic_launcher.png
Normal file
BIN
src/pt/prazeresviolentos/res/mipmap-xxhdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 19 KiB |
BIN
src/pt/prazeresviolentos/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
BIN
src/pt/prazeresviolentos/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 32 KiB |
@ -0,0 +1,37 @@
|
||||
package eu.kanade.tachiyomi.extension.pt.prazeresviolentos
|
||||
|
||||
import eu.kanade.tachiyomi.multisrc.madara.Madara
|
||||
import eu.kanade.tachiyomi.network.interceptor.rateLimit
|
||||
import okhttp3.Interceptor
|
||||
import okhttp3.OkHttpClient
|
||||
import okhttp3.Response
|
||||
import java.io.IOException
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Locale
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
class PrazeresViolentos : Madara(
|
||||
"Prazeres Violentos",
|
||||
"https://prazeresviolentos.com",
|
||||
"pt-BR",
|
||||
SimpleDateFormat("MMMM dd, yyyy", Locale("pt", "BR")),
|
||||
) {
|
||||
|
||||
override val client: OkHttpClient = super.client.newBuilder()
|
||||
.rateLimit(1, 2, TimeUnit.SECONDS)
|
||||
.addInterceptor(::checkPasswordProtectedIntercept)
|
||||
.build()
|
||||
|
||||
private fun checkPasswordProtectedIntercept(chain: Interceptor.Chain): Response {
|
||||
val response = chain.proceed(chain.request())
|
||||
|
||||
if (response.request.url.queryParameter("password-protected") != null) {
|
||||
response.close()
|
||||
throw IOException("Autentique-se através da WebView e tente novamente.")
|
||||
}
|
||||
|
||||
return response
|
||||
}
|
||||
|
||||
override val useNewChapterEndpoint = true
|
||||
}
|
Loading…
Reference in New Issue
Block a user