parent
50f8cb9193
commit
01607ec1e2
@ -1,11 +1,10 @@
|
|||||||
package org.koitharu.kotatsu.core.parser.site
|
package org.koitharu.kotatsu.core.parser.site
|
||||||
|
|
||||||
import org.koitharu.kotatsu.core.model.MangaSource
|
/*
|
||||||
|
class HentaiLibRepository(loaderContext: MangaLoaderContext) : MangaLibRepository(loaderContext) {
|
||||||
class HentaiLibRepository : MangaLibRepository() {
|
|
||||||
|
|
||||||
protected override val defaultDomain = "hentailib.me"
|
protected override val defaultDomain = "hentailib.me"
|
||||||
|
|
||||||
override val source = MangaSource.HENTAILIB
|
override val source = MangaSource.HENTAILIB
|
||||||
|
|
||||||
}
|
}*/
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
package org.koitharu.kotatsu.core.parser.site
|
package org.koitharu.kotatsu.core.parser.site
|
||||||
|
|
||||||
import org.koitharu.kotatsu.core.model.MangaSource
|
import org.koitharu.kotatsu.core.model.MangaSource
|
||||||
|
import org.koitharu.kotatsu.domain.MangaLoaderContext
|
||||||
|
|
||||||
class MangaChanRepository : ChanRepository() {
|
class MangaChanRepository(loaderContext: MangaLoaderContext) : ChanRepository(loaderContext) {
|
||||||
|
|
||||||
override val defaultDomain = "manga-chan.me"
|
override val defaultDomain = "manga-chan.me"
|
||||||
override val source = MangaSource.MANGACHAN
|
override val source = MangaSource.MANGACHAN
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
package org.koitharu.kotatsu.core.parser.site
|
package org.koitharu.kotatsu.core.parser.site
|
||||||
|
|
||||||
import org.koitharu.kotatsu.core.model.MangaSource
|
import org.koitharu.kotatsu.core.model.MangaSource
|
||||||
|
import org.koitharu.kotatsu.domain.MangaLoaderContext
|
||||||
|
|
||||||
class MintMangaRepository : GroupleRepository() {
|
class MintMangaRepository(loaderContext: MangaLoaderContext) : GroupleRepository(loaderContext) {
|
||||||
|
|
||||||
override val source = MangaSource.MINTMANGA
|
override val source = MangaSource.MINTMANGA
|
||||||
override val defaultDomain: String = "mintmanga.live"
|
override val defaultDomain: String = "mintmanga.live"
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
package org.koitharu.kotatsu.core.parser.site
|
package org.koitharu.kotatsu.core.parser.site
|
||||||
|
|
||||||
import org.koitharu.kotatsu.core.model.MangaSource
|
import org.koitharu.kotatsu.core.model.MangaSource
|
||||||
|
import org.koitharu.kotatsu.domain.MangaLoaderContext
|
||||||
|
|
||||||
class ReadmangaRepository : GroupleRepository() {
|
class ReadmangaRepository(loaderContext: MangaLoaderContext) : GroupleRepository(loaderContext) {
|
||||||
|
|
||||||
override val defaultDomain = "readmanga.me"
|
override val defaultDomain = "readmanga.me"
|
||||||
override val source = MangaSource.READMANGA_RU
|
override val source = MangaSource.READMANGA_RU
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
package org.koitharu.kotatsu.core.parser.site
|
package org.koitharu.kotatsu.core.parser.site
|
||||||
|
|
||||||
import org.koitharu.kotatsu.core.model.MangaSource
|
import org.koitharu.kotatsu.core.model.MangaSource
|
||||||
|
import org.koitharu.kotatsu.domain.MangaLoaderContext
|
||||||
|
|
||||||
class SelfMangaRepository : GroupleRepository() {
|
class SelfMangaRepository(loaderContext: MangaLoaderContext) : GroupleRepository(loaderContext) {
|
||||||
|
|
||||||
override val defaultDomain = "selfmanga.ru"
|
override val defaultDomain = "selfmanga.ru"
|
||||||
override val source = MangaSource.SELFMANGA
|
override val source = MangaSource.SELFMANGA
|
||||||
|
|||||||
@ -0,0 +1,19 @@
|
|||||||
|
package org.koitharu.kotatsu.parsers
|
||||||
|
|
||||||
|
import okhttp3.Cookie
|
||||||
|
import okhttp3.CookieJar
|
||||||
|
import okhttp3.HttpUrl
|
||||||
|
import org.koitharu.kotatsu.core.local.cookies.cache.SetCookieCache
|
||||||
|
|
||||||
|
class TemporaryCookieJar : CookieJar {
|
||||||
|
|
||||||
|
private val cache = SetCookieCache()
|
||||||
|
|
||||||
|
override fun loadForRequest(url: HttpUrl): List<Cookie> {
|
||||||
|
return cache.toList()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun saveFromResponse(url: HttpUrl, cookies: List<Cookie>) {
|
||||||
|
cache.addAll(cookies)
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue