TMO: Update domain and fix image headers (#5284)

update domain and headers
This commit is contained in:
bapeey 2024-09-28 05:27:55 -05:00 committed by GitHub
parent 3dc05e8803
commit 74717fddcc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 9 additions and 15 deletions

View File

@ -14,7 +14,7 @@
<category android:name="android.intent.category.BROWSABLE" /> <category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https"/> <data android:scheme="https"/>
<data android:host="lectormanga.com"/> <data android:host="lectormanga.com"/>
<data android:host="visortmo.com"/> <data android:host="zonatmo.com"/>
<data android:pathPattern="/library/..*/..*/..*"/> <data android:pathPattern="/library/..*/..*/..*"/>
</intent-filter> </intent-filter>
</activity> </activity>

View File

@ -1,7 +1,7 @@
ext { ext {
extName = 'TuMangaOnline / LectorManga' extName = 'TuMangaOnline / LectorManga'
extClass = '.LectorTmoFactory' extClass = '.LectorTmoFactory'
extVersionCode = 3 extVersionCode = 4
isNsfw = true isNsfw = true
} }

View File

@ -439,9 +439,12 @@ abstract class LectorTmo(
} }
} }
override fun imageRequest(page: Page): Request { override fun imageRequest(page: Page) = GET(
return GET(page.imageUrl!! + "#imagereq", tmoHeaders) url = page.imageUrl!! + "#imagereq",
} headers = headers.newBuilder()
.set("Referer", page.url.substringBefore("news/"))
.build(),
)
override fun imageUrlParse(document: Document) = throw UnsupportedOperationException() override fun imageUrlParse(document: Document) = throw UnsupportedOperationException()

View File

@ -1,10 +1,8 @@
package eu.kanade.tachiyomi.extension.es.lectortmo package eu.kanade.tachiyomi.extension.es.lectortmo
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.NetworkHelper import eu.kanade.tachiyomi.network.NetworkHelper
import eu.kanade.tachiyomi.network.interceptor.rateLimit import eu.kanade.tachiyomi.network.interceptor.rateLimit
import eu.kanade.tachiyomi.source.SourceFactory import eu.kanade.tachiyomi.source.SourceFactory
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.util.asJsoup import eu.kanade.tachiyomi.util.asJsoup
@ -27,7 +25,7 @@ val rateLimitClient = Injekt.get<NetworkHelper>().cloudflareClient.newBuilder()
.rateLimit(1, 1500, TimeUnit.MILLISECONDS) .rateLimit(1, 1500, TimeUnit.MILLISECONDS)
.build() .build()
class TuMangaOnline : LectorTmo("TuMangaOnline", "https://visortmo.com", "es", rateLimitClient) { class TuMangaOnline : LectorTmo("TuMangaOnline", "https://zonatmo.com", "es", rateLimitClient) {
override val id = 4146344224513899730 override val id = 4146344224513899730
} }
@ -82,11 +80,4 @@ class LectorManga : LectorTmo("LectorManga", "https://lectormanga.com", "es", ra
parseChapterDate(it) parseChapterDate(it)
} ?: 0 } ?: 0
} }
override fun imageRequest(page: Page) = GET(
url = page.imageUrl!! + "#imagereq",
headers = headers.newBuilder()
.set("Referer", page.url.substringBefore("news/"))
.build(),
)
} }