Lint fixes

This commit is contained in:
arkon 2020-04-24 23:16:31 -04:00 committed by arkon
parent 5e05175f8c
commit 020c2af006
130 changed files with 1765 additions and 1429 deletions

View File

@ -1,7 +1,11 @@
package eu.kanade.tachiyomi.extension.en.myhentaicomics
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import okhttp3.OkHttpClient
import okhttp3.Request

View File

@ -2,7 +2,12 @@ package eu.kanade.tachiyomi.extension.en.myhentaigallery
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.asObservableSuccess
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import okhttp3.HttpUrl
import okhttp3.OkHttpClient

View File

@ -1,13 +1,17 @@
package eu.kanade.tachiyomi.extension.en.oglaf
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import okhttp3.Request
import okhttp3.Response
import org.jsoup.Jsoup
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import rx.Observable
import org.jsoup.Jsoup
class Oglaf : ParsedHttpSource() {
@ -94,5 +98,4 @@ class Oglaf : ParsedHttpSource() {
override fun latestUpdatesRequest(page: Int): Request = throw Exception("Not used")
override fun latestUpdatesSelector(): String = throw Exception("Not used")
}

View File

@ -1,7 +1,11 @@
package eu.kanade.tachiyomi.extension.en.patchfriday
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.HttpSource
import eu.kanade.tachiyomi.util.asJsoup
import okhttp3.OkHttpClient

View File

@ -1,15 +1,20 @@
package eu.kanade.tachiyomi.extension.en.perveden
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import java.text.ParseException
import java.text.SimpleDateFormat
import java.util.Calendar
import java.util.Locale
import okhttp3.HttpUrl
import okhttp3.Request
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import java.text.ParseException
import java.text.SimpleDateFormat
import java.util.*
class Perveden : ParsedHttpSource() {

View File

@ -1,7 +1,12 @@
package eu.kanade.tachiyomi.extension.en.pururin
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import okhttp3.OkHttpClient
@ -76,7 +81,6 @@ class Pururin : ParsedHttpSource() {
val parodies = infoElement.select("tr:has(td:contains(Parody)) a").text()
val pagess = infoElement.select("tr:has(td:contains(Pages)) td:eq(1)").text()
if (magazine.isNotEmpty()) {
stringBuilder.append("Magazine: ")
stringBuilder.append(magazine)
@ -185,4 +189,3 @@ class Pururin : ParsedHttpSource() {
private class Tag(name: String) : Filter.Text(name)
}

View File

@ -1,6 +1,10 @@
package eu.kanade.tachiyomi.extension.en.questionablecontent
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import okhttp3.Request
import okhttp3.Response
@ -83,5 +87,4 @@ class QuestionableContent : ParsedHttpSource() {
override fun latestUpdatesRequest(page: Int): Request = throw Exception("Not used")
override fun latestUpdatesSelector(): String = throw Exception("Not used")
}

View File

@ -7,8 +7,15 @@ import android.support.v7.preference.PreferenceScreen
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.POST
import eu.kanade.tachiyomi.source.ConfigurableSource
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import java.text.SimpleDateFormat
import java.util.Locale
import java.util.regex.Pattern
import okhttp3.FormBody
import okhttp3.OkHttpClient
import okhttp3.Request
@ -17,9 +24,6 @@ import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import uy.kohesive.injekt.Injekt
import uy.kohesive.injekt.api.get
import java.text.SimpleDateFormat
import java.util.Locale
import java.util.regex.Pattern
class Readcomiconline : ConfigurableSource, ParsedHttpSource() {
@ -224,8 +228,6 @@ class Readcomiconline : ConfigurableSource, ParsedHttpSource() {
screen.addPreference(qualitypref)
}
override fun setupPreferenceScreen(screen: PreferenceScreen) {
val qualitypref = ListPreference(screen.context).apply {
key = QUALITY_PREF_Title

View File

@ -8,13 +8,13 @@ import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import java.util.Calendar
import java.util.concurrent.TimeUnit
import okhttp3.FormBody
import okhttp3.OkHttpClient
import okhttp3.Request
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import java.util.Calendar
import java.util.concurrent.TimeUnit
class ReadM : ParsedHttpSource() {
@ -41,7 +41,6 @@ class ReadM : ParsedHttpSource() {
title = this.text().trim()
url = this.attr("href")
}
}
// Latest
@ -83,7 +82,6 @@ class ReadM : ParsedHttpSource() {
return POST("$baseUrl/service/advanced_search", searchHeaders, formBody.build())
}
override fun searchMangaNextPageSelector(): String? = null
override fun searchMangaSelector(): String = "div.poster-with-subject"
override fun searchMangaFromElement(element: Element): SManga = popularMangaFromElement(element)
@ -166,7 +164,6 @@ class ReadM : ParsedHttpSource() {
private class GenreFilter(state: List<Tag>) : Filter.Group<Tag>("Genres", state)
private class Tag(name: String, val id: String) : Filter.TriState(name)
private val typeArray = arrayOf(
Pair("All", "all"),
Pair("Japanese Manga", "japanese"),
@ -221,6 +218,4 @@ class ReadM : ParsedHttpSource() {
Tag("Yaoi", "28"),
Tag("Yuri", "20")
).sortedWith(compareBy { it.name })
}

View File

@ -2,14 +2,18 @@ package eu.kanade.tachiyomi.extension.en.readmangatoday
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.POST
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import java.util.Calendar
import okhttp3.Headers
import okhttp3.OkHttpClient
import okhttp3.Request
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import java.util.*
class Readmangatoday : ParsedHttpSource() {

View File

@ -1,18 +1,23 @@
package eu.kanade.tachiyomi.extension.en.renascans
import com.github.salomonbrys.kotson.fromJson
import com.github.salomonbrys.kotson.get
import com.google.gson.Gson
import com.google.gson.JsonObject
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import java.text.SimpleDateFormat
import java.util.Locale
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import java.text.SimpleDateFormat
import java.util.*
import com.github.salomonbrys.kotson.*
import com.google.gson.Gson
import com.google.gson.JsonObject
class Renascans : ParsedHttpSource() {
@ -146,5 +151,4 @@ class Renascans : ParsedHttpSource() {
override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException("Not used")
override fun getFilterList() = FilterList()
}

View File

@ -1,15 +1,19 @@
package eu.kanade.tachiyomi.extension.en.sleepypandascans
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import java.util.Calendar
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import java.util.Calendar
class SleepyPandaScans : ParsedHttpSource() {
@ -149,5 +153,4 @@ class SleepyPandaScans : ParsedHttpSource() {
override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException("Not used")
override fun getFilterList() = FilterList()
}

View File

@ -1,7 +1,6 @@
package eu.kanade.tachiyomi.extension.en.tapastic
import android.net.Uri
import android.util.Log
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
@ -10,12 +9,12 @@ import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import java.text.SimpleDateFormat
import java.util.Locale
import okhttp3.Request
import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import java.text.SimpleDateFormat
import java.util.Locale
class Tapastic : ParsedHttpSource() {
@ -227,7 +226,9 @@ class Tapastic : ParsedHttpSource() {
*/
// vals: <name, display>
private open class UriSelectFilter(
displayName: String, val uriParam: String, val vals: Array<Pair<String, String>>,
displayName: String,
val uriParam: String,
val vals: Array<Pair<String, String>>,
val firstIsUnspecified: Boolean = true,
defaultValue: Int = 0
) :

View File

@ -5,13 +5,18 @@ import com.github.salomonbrys.kotson.get
import com.google.gson.Gson
import com.google.gson.JsonObject
import eu.kanade.tachiyomi.extension.en.tsumino.TsuminoUtils.Companion.getArtists
import eu.kanade.tachiyomi.extension.en.tsumino.TsuminoUtils.Companion.getCollection
import eu.kanade.tachiyomi.extension.en.tsumino.TsuminoUtils.Companion.getChapter
import eu.kanade.tachiyomi.extension.en.tsumino.TsuminoUtils.Companion.getCollection
import eu.kanade.tachiyomi.extension.en.tsumino.TsuminoUtils.Companion.getDesc
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.POST
import eu.kanade.tachiyomi.network.asObservableSuccess
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import okhttp3.FormBody

View File

@ -100,8 +100,8 @@ class TsuminoUtils {
name = "Chapter"
scanlator = getGroups(document)
chapter_number = 1f
url = response.request().url().encodedPath().
replace("entry", "Read/Index")
url = response.request().url().encodedPath()
.replace("entry", "Read/Index")
}
chapterList.add(chapter)
return chapterList

View File

@ -4,7 +4,11 @@ import android.os.Build.VERSION
import eu.kanade.tachiyomi.extension.BuildConfig
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.asObservableSuccess
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import okhttp3.Headers
import okhttp3.Response

View File

@ -1,7 +1,12 @@
package eu.kanade.tachiyomi.extension.en.webcomics
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import okhttp3.HttpUrl
@ -9,7 +14,6 @@ import okhttp3.Request
import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import java.lang.UnsupportedOperationException
class Webcomics : ParsedHttpSource() {

View File

@ -5,13 +5,17 @@ import com.github.salomonbrys.kotson.get
import com.google.gson.Gson
import com.google.gson.JsonObject
import eu.kanade.tachiyomi.network.POST
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.HttpSource
import okhttp3.OkHttpClient
import okhttp3.Headers
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.Response
import okhttp3.RequestBody
import okhttp3.Response
class Wutopia : HttpSource() {
@ -129,5 +133,4 @@ class Wutopia : HttpSource() {
override fun imageUrlParse(response: Response): String = throw UnsupportedOperationException("Not used")
override fun getFilterList() = FilterList()
}

View File

@ -1,14 +1,18 @@
package eu.kanade.tachiyomi.extension.en.xkcd
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import java.text.SimpleDateFormat
import java.util.Locale
import okhttp3.Request
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import rx.Observable
import java.text.SimpleDateFormat
import java.util.Locale
class Xkcd : ParsedHttpSource() {
@ -129,5 +133,4 @@ class Xkcd : ParsedHttpSource() {
const val baseAltTextUrl = "https://fakeimg.pl/1500x2126/ffffff/000000/?text="
const val baseAltTextPostUrl = "&font_size=42&font=museo"
}
}

View File

@ -11,13 +11,13 @@ import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import java.text.SimpleDateFormat
import java.util.Locale
import okhttp3.Request
import okhttp3.RequestBody
import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import java.text.SimpleDateFormat
import java.util.Locale
open class DoujinYang : ParsedHttpSource() {
@ -35,7 +35,6 @@ open class DoujinYang : ParsedHttpSource() {
override fun latestUpdatesNextPageSelector() = "nav#paginacion a:contains(Última)"
override fun searchMangaNextPageSelector() = latestUpdatesNextPageSelector()
override fun popularMangaRequest(page: Int) =
GET("$baseUrl/directorio/?orden=visitas&p=$page", headers)
@ -93,7 +92,6 @@ open class DoujinYang : ParsedHttpSource() {
return manga
}
override fun chapterListParse(response: Response): List<SChapter> {
return response.asJsoup().select("div#c_list a").map { element ->
SChapter.create().apply {
@ -330,4 +328,3 @@ open class DoujinYang : ParsedHttpSource() {
fun addToUri(uri: Uri.Builder)
}
}

View File

@ -1,13 +1,25 @@
package eu.kanade.tachiyomi.extension.es.heavenmanga
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.network.asObservableSuccess
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import okhttp3.*
import java.text.SimpleDateFormat
import java.util.Locale
import okhttp3.Headers
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import org.jsoup.select.Elements
import rx.Observable
class HeavenManga : ParsedHttpSource() {
@ -76,7 +88,6 @@ class HeavenManga : ParsedHttpSource() {
}
}
}
}
return GET(searchUrl, headers)
@ -123,6 +134,7 @@ class HeavenManga : ParsedHttpSource() {
setUrlWithoutDomain(it.attr("href"))
}
scanlator = element.select("span.pull-right").text()
}
}
@ -294,10 +306,8 @@ class HeavenManga : ParsedHttpSource() {
ListaCompletasFilter()
)
private open class UriPartFilter(displayName: String, val vals: Array<Pair<String, String>>) :
Filter.Select<String>(displayName, vals.map { it.first }.toTypedArray()) {
fun toUriPart() = vals[state].second
}
}

View File

@ -62,7 +62,7 @@ class Ikuhentai : ParsedHttpSource() {
url.addQueryParameter("s", "")
}
var orderBy = ""
var orderBy: String
(if (filters.isEmpty()) getFilterList() else filters).forEach { filter ->
when (filter) {
@ -95,7 +95,7 @@ class Ikuhentai : ParsedHttpSource() {
}
is SortBy -> {
orderBy = filter.toUriPart();
orderBy = filter.toUriPart()
url.addQueryParameter("m_orderby", orderBy)
}
is TextField -> url.addQueryParameter(filter.key, filter.state)
@ -105,8 +105,6 @@ class Ikuhentai : ParsedHttpSource() {
return GET(url.toString(), headers)
}
// max 200 results
override fun mangaDetailsParse(document: Document): SManga {
@ -264,5 +262,4 @@ class Ikuhentai : ParsedHttpSource() {
Filter.Select<String>(displayName, vals.map { it.first }.toTypedArray()) {
fun toUriPart() = vals[state].second
}
}

View File

@ -8,17 +8,21 @@ import com.google.gson.JsonElement
import com.google.gson.JsonObject
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.POST
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import java.text.SimpleDateFormat
import java.util.Locale
import okhttp3.OkHttpClient
import okhttp3.RequestBody
import okhttp3.Request
import okhttp3.RequestBody
import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import java.text.SimpleDateFormat
import java.util.Locale
class InManga : ParsedHttpSource() {

View File

@ -2,19 +2,30 @@ package eu.kanade.tachiyomi.extension.es.lectormanga
import android.app.Application
import android.content.SharedPreferences
import android.support.v7.preference.*
import android.support.v7.preference.ListPreference
import android.support.v7.preference.PreferenceScreen
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.ConfigurableSource
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import okhttp3.*
import java.text.SimpleDateFormat
import java.util.Date
import java.util.Locale
import java.util.TimeZone
import okhttp3.FormBody
import okhttp3.Headers
import okhttp3.HttpUrl
import okhttp3.Request
import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import uy.kohesive.injekt.Injekt
import uy.kohesive.injekt.api.get
import java.text.SimpleDateFormat
import java.util.*
/**
* Note: this source is similar to TuMangaOnline.
@ -60,7 +71,6 @@ class LectorManga : ConfigurableSource, ParsedHttpSource() {
thumbnail_url = element.select("img").attr("src")
}
// Latest
override fun latestUpdatesRequest(page: Int) = GET("$baseUrl/library?order_item=creation&order_dir=desc&page=$page", headers)

View File

@ -1,6 +1,5 @@
package eu.kanade.tachiyomi.extension.es.mangamx
import android.net.Uri
import com.github.salomonbrys.kotson.get
import com.github.salomonbrys.kotson.string
@ -8,16 +7,21 @@ import com.google.gson.JsonElement
import com.google.gson.JsonParser
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.POST
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import java.text.SimpleDateFormat
import java.util.Locale
import okhttp3.FormBody
import okhttp3.Request
import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import java.text.SimpleDateFormat
import java.util.Locale
open class MangaMx : ParsedHttpSource() {
@ -207,7 +211,6 @@ open class MangaMx : ParsedHttpSource() {
OrderFilter("Orden", orderArray)
)
private class StatusFilter(name: String, values: Array<Pair<String, String>>) :
Filter.Select<String>(name, values.map { it.first }.toTypedArray())
@ -251,4 +254,3 @@ open class MangaMx : ParsedHttpSource() {
Pair("Ascendente", "asc")
)
}

View File

@ -1,9 +1,14 @@
package eu.kanade.tachiyomi.extension.es.tmohentai
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import okhttp3.*
import okhttp3.HttpUrl
import okhttp3.Request
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
@ -213,5 +218,4 @@ class TMOHentai : ParsedHttpSource() {
Pair("Popularidad", "popularity")
)
}
}

View File

@ -6,16 +6,24 @@ import android.support.v7.preference.ListPreference
import android.support.v7.preference.PreferenceScreen
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.ConfigurableSource
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import okhttp3.*
import java.text.SimpleDateFormat
import java.util.Locale
import okhttp3.FormBody
import okhttp3.Headers
import okhttp3.HttpUrl
import okhttp3.Request
import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import uy.kohesive.injekt.Injekt
import uy.kohesive.injekt.api.get
import java.text.SimpleDateFormat
import java.util.*
class TuMangaOnline : ConfigurableSource, ParsedHttpSource() {

View File

@ -1,11 +1,16 @@
package eu.kanade.tachiyomi.extension.es.vcpvmp
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import okhttp3.HttpUrl
import okhttp3.Request
import org.jsoup.nodes.*
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
open class VCPVMP(override val name: String, override val baseUrl: String) : ParsedHttpSource() {
@ -57,7 +62,6 @@ open class VCPVMP(override val name: String, override val baseUrl: String) : Par
setUrlWithoutDomain(element.baseUri())
}
override fun pageListRequest(chapter: SChapter) = GET(baseUrl + chapter.url)
override fun pageListParse(document: Document): List<Page> = mutableListOf<Page>().apply {
@ -477,5 +481,4 @@ open class VCPVMP(override val name: String, override val baseUrl: String) : Par
Pair("Zzomp", "252"),
Pair("ZZZ Comics", "2839")
))
}

View File

@ -1,7 +1,8 @@
package eu.kanade.tachiyomi.extension.es.vcpvmp
import eu.kanade.tachiyomi.source.*
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.Source
import eu.kanade.tachiyomi.source.SourceFactory
import eu.kanade.tachiyomi.source.model.Filter
class VCPVMPFactory : SourceFactory {
override fun createSources(): List<Source> = listOf(
@ -363,7 +364,6 @@ class VMP : VCPVMP("VMP", "https://vermangasporno.com") {
Pair("Zoids Shinseiki Zero", "153"),
Pair("Zombieland Saga", "2059")
))
}
open class UriPartFilter(displayName: String, val vals: Array<Pair<String, String>>) :

View File

@ -2,7 +2,11 @@ package eu.kanade.tachiyomi.extension.es.zahard
import android.net.Uri
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import okhttp3.Request
import org.jsoup.nodes.Document
@ -157,9 +161,13 @@ class Zahard : ParsedHttpSource() {
Pair("Comics", "Comics")
))
private open class UriSelectFilter(displayName: String, val uriParam: String, val vals: Array<Pair<String, String>>,
private open class UriSelectFilter(
displayName: String,
val uriParam: String,
val vals: Array<Pair<String, String>>,
val firstIsUnspecified: Boolean = true,
defaultValue: Int = 0) :
defaultValue: Int = 0
) :
Filter.Select<String>(displayName, vals.map { it.second }.toTypedArray(), defaultValue), UriFilter {
override fun addToUri(uri: Uri.Builder) {
if (state != 0 || !firstIsUnspecified)
@ -174,6 +182,4 @@ class Zahard : ParsedHttpSource() {
private interface UriFilter {
fun addToUri(uri: Uri.Builder)
}
}

View File

@ -19,6 +19,11 @@ import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import java.io.ByteArrayOutputStream
import java.io.InputStream
import java.text.ParseException
import java.text.SimpleDateFormat
import java.util.Locale
import okhttp3.FormBody
import okhttp3.MediaType
import okhttp3.OkHttpClient
@ -28,11 +33,6 @@ import okhttp3.ResponseBody
import org.apache.commons.lang3.StringUtils
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import java.io.ByteArrayOutputStream
import java.io.InputStream
import java.text.ParseException
import java.text.SimpleDateFormat
import java.util.Locale
class Japscan : ParsedHttpSource() {
@ -101,7 +101,6 @@ class Japscan : ParsedHttpSource() {
createKeysheet(doc, doc2)
}
// Popular
override fun popularMangaRequest(page: Int): Request {
return GET("$baseUrl/mangas/", headers)
@ -204,7 +203,6 @@ class Japscan : ParsedHttpSource() {
return MangasPage(mangas, hasNextPage)
}
}
override fun searchMangaFromElement(element: Element): SManga = SManga.create().apply {
@ -252,7 +250,6 @@ class Japscan : ParsedHttpSource() {
// JapScan sometimes uploads some "spoiler preview" chapters, containing 2 or 3 untranslated pictures taken from a raw. Sometimes they also upload full RAWs/US versions and replace them with a translation as soon as available.
// Those have a span.badge "SPOILER" or "RAW". The additional pseudo selector makes sure to exclude these from the chapter list.
override fun chapterFromElement(element: Element): SChapter {
val urlElement = element.select("a").first()
@ -284,7 +281,6 @@ class Japscan : ParsedHttpSource() {
pageUrls.add(pages[i].attr("data-img").substring("https://c.japscan.co/".length, pages[i].attr("data-img").length - 4))
}
val az = "0123456789abcdefghijklmnopqrstuvwxyz".toCharArray()
val ks = "0123456789abcdefghijklmnopqrstuvwxyz".toCharArray()
@ -292,7 +288,6 @@ class Japscan : ParsedHttpSource() {
for (j in 0 until realPageUrls[i].length) {
if (realPageUrls[i][j] != pageUrls[i][j]) {
ks[az.indexOf(pageUrls[i][j])] = realPageUrls[i][j]
}
}
keysheet = ks.joinToString("")

View File

@ -2,7 +2,11 @@ package eu.kanade.tachiyomi.extension.fr.lirescan
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.asObservableSuccess
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import okhttp3.OkHttpClient
@ -122,5 +126,4 @@ class LireScan : ParsedHttpSource() {
}
override fun getFilterList() = FilterList()
}

View File

@ -1,6 +1,5 @@
package eu.kanade.tachiyomi.extension.fr.mangakawaii
import android.net.Uri
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.FilterList
@ -9,15 +8,14 @@ import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import java.text.SimpleDateFormat
import java.util.Locale
import okhttp3.Headers
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import java.text.SimpleDateFormat
import java.util.Locale
class MangaKawaii : ParsedHttpSource() {
@ -66,7 +64,6 @@ class MangaKawaii : ParsedHttpSource() {
return manga
}
override fun chapterFromElement(element: Element): SChapter {
val chapter = SChapter.create()
chapter.url = element.select("a.list-item__title").attr("href")

View File

@ -2,19 +2,22 @@ package eu.kanade.tachiyomi.extension.fr.scantrad
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.asObservableSuccess
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import java.text.SimpleDateFormat
import java.util.Calendar
import java.util.Locale
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import java.util.Calendar
import java.util.Locale
import java.text.SimpleDateFormat
import rx.Observable
import java.lang.Exception
class Scantrad : ParsedHttpSource() {
@ -197,5 +200,4 @@ class Scantrad : ParsedHttpSource() {
override fun imageUrlParse(document: Document) = throw UnsupportedOperationException("Not used")
override fun getFilterList() = FilterList()
}

View File

@ -1,14 +1,18 @@
package eu.kanade.tachiyomi.extension.id.bacakomik
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import okhttp3.*
import okhttp3.Headers
import okhttp3.HttpUrl
import okhttp3.OkHttpClient
import okhttp3.Request
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import eu.kanade.tachiyomi.source.model.*
import java.text.SimpleDateFormat
import java.util.*
import java.text.ParseException
class Bacakomik : ParsedHttpSource() {
override val name = "Bacakomik"
@ -259,6 +263,4 @@ override fun mangaDetailsParse(document: Document): SManga {
Filter.Select<String>(displayName, vals.map { it.first }.toTypedArray()) {
fun toUriPart() = vals[state].second
}
}

View File

@ -2,18 +2,26 @@ package eu.kanade.tachiyomi.extension.id.bacamanga
import android.util.Base64
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import okhttp3.*
import java.io.UnsupportedEncodingException
import java.net.URLDecoder
import java.text.SimpleDateFormat
import java.util.Locale
import okhttp3.Headers
import okhttp3.HttpUrl
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.Response
import org.json.JSONObject
import org.jsoup.Jsoup
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import java.io.UnsupportedEncodingException
import java.net.URLDecoder
import java.text.SimpleDateFormat
import java.util.*
class BacaManga : ParsedHttpSource() {
@ -117,8 +125,8 @@ class BacaManga : ParsedHttpSource() {
// Add date for latest chapter only
document.select("script.yoast-schema-graph").html()
.let {
val date = JSONObject(it).getJSONArray("@graph").
getJSONObject(3).getString("dateModified")
val date = JSONObject(it).getJSONArray("@graph")
.getJSONObject(3).getString("dateModified")
chapters[0].date_upload = parseDate(date)
}
return chapters

View File

@ -1,7 +1,11 @@
package eu.kanade.tachiyomi.extension.id.kiryuu
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import okhttp3.Headers
import okhttp3.HttpUrl

View File

@ -1,12 +1,19 @@
package eu.kanade.tachiyomi.extension.id.komikcast
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import okhttp3.*
import java.util.Calendar
import okhttp3.Headers
import okhttp3.HttpUrl
import okhttp3.OkHttpClient
import okhttp3.Request
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import eu.kanade.tachiyomi.source.model.*
import java.util.*
class Komikcast : ParsedHttpSource() {
@ -37,7 +44,7 @@ class Komikcast : ParsedHttpSource() {
url.toString()
} else {
val url = HttpUrl.parse("$baseUrl/daftar-komik/page/$page")!!.newBuilder()
var orderBy = ""
var orderBy: String
(if (filters.isEmpty()) getFilterList() else filters).forEach { filter ->
when (filter) {
is Status -> url.addQueryParameter("status", arrayOf("", "ongoing", "completed")[filter.state])

View File

@ -2,16 +2,20 @@ package eu.kanade.tachiyomi.extension.id.komikindo
import android.annotation.SuppressLint
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import java.text.SimpleDateFormat
import java.util.Calendar
import okhttp3.Headers
import okhttp3.HttpUrl
import okhttp3.OkHttpClient
import okhttp3.Request
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import java.text.SimpleDateFormat
import java.util.*
class KomikIndo : ParsedHttpSource() {
@ -81,17 +85,17 @@ class KomikIndo : ParsedHttpSource() {
override fun mangaDetailsParse(document: Document): SManga {
val infoElm = document.select(".listinfo > ul > li")
val manga = SManga.create()
infoElm.forEachIndexed { index, element ->
infoElm.forEach { element ->
val infoTitle = element.select("b").text().toLowerCase()
var infoContent = element.text()
val infoContent = element.text()
when {
infoTitle.contains("status") -> manga.status = parseStatus(infoContent)
infoTitle.contains("author") -> manga.author = infoContent
infoTitle.contains("artist") -> manga.artist = infoContent
infoTitle.contains("genres") -> {
val genres = mutableListOf<String>()
element.select("a").forEach { element ->
val genre = element.text()
element.select("a").forEach { a ->
val genre = a.text()
genres.add(genre)
}
manga.genre = genres.joinToString(", ")

View File

@ -2,21 +2,14 @@ package eu.kanade.tachiyomi.extension.id.komiku
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import java.util.Calendar
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import org.jsoup.select.Elements
import java.text.SimpleDateFormat
import java.util.Calendar
import java.util.Locale
class Komiku : ParsedHttpSource() {
override val name = "Komiku"

View File

@ -1,9 +1,14 @@
package eu.kanade.tachiyomi.extension.id.maidmanga
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import java.text.SimpleDateFormat
import okhttp3.HttpUrl
import okhttp3.OkHttpClient
import okhttp3.Request
@ -11,7 +16,6 @@ import okhttp3.Response
import org.json.JSONObject
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import java.text.SimpleDateFormat
class MaidManga : ParsedHttpSource() {
@ -166,8 +170,8 @@ class MaidManga : ParsedHttpSource() {
// Add date for latest chapter only
document.select("script.yoast-schema-graph").html()
.let {
val date = JSONObject(it).getJSONArray("@graph").
getJSONObject(3).getString("dateModified")
val date = JSONObject(it).getJSONArray("@graph")
.getJSONObject(3).getString("dateModified")
chapters[0].date_upload = parseDate(date)
}
return chapters

View File

@ -6,16 +6,19 @@ import com.github.salomonbrys.kotson.int
import com.google.gson.Gson
import com.google.gson.JsonObject
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import java.text.SimpleDateFormat
import java.util.Locale
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import java.lang.Exception
import java.text.SimpleDateFormat
import java.util.Locale
class MangaIndo : ParsedHttpSource() {
@ -147,5 +150,4 @@ class MangaIndo : ParsedHttpSource() {
override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException("Not used")
override fun getFilterList() = FilterList()
}

View File

@ -2,7 +2,11 @@ package eu.kanade.tachiyomi.extension.id.mangaku
import android.annotation.SuppressLint
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import okhttp3.Headers

View File

@ -1,9 +1,11 @@
package eu.kanade.tachiyomi.extension.id.mangakyo
import android.net.Uri
import android.util.Log
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import okhttp3.OkHttpClient
import okhttp3.Request

View File

@ -1,14 +1,18 @@
package eu.kanade.tachiyomi.extension.id.mangashiro
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import okhttp3.*
import okhttp3.Headers
import okhttp3.HttpUrl
import okhttp3.OkHttpClient
import okhttp3.Request
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import eu.kanade.tachiyomi.source.model.*
import java.text.SimpleDateFormat
import java.util.*
import java.text.ParseException
class Mangashiro : ParsedHttpSource() {
@ -261,6 +265,4 @@ class Mangashiro : ParsedHttpSource() {
Filter.Select<String>(displayName, vals.map { it.first }.toTypedArray()) {
fun toUriPart() = vals[state].second
}
}

View File

@ -2,20 +2,13 @@ package eu.kanade.tachiyomi.extension.id.manhuaid
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import org.jsoup.select.Elements
import java.text.SimpleDateFormat
import java.util.Calendar
import java.util.Locale
class ManhuaID : ParsedHttpSource() {

View File

@ -1,17 +1,21 @@
package eu.kanade.tachiyomi.extension.id.neumanga
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import java.security.SecureRandom
import java.security.cert.X509Certificate
import javax.net.ssl.SSLContext
import javax.net.ssl.X509TrustManager
import okhttp3.HttpUrl
import okhttp3.Request
import org.json.JSONArray
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import java.security.SecureRandom
import java.security.cert.X509Certificate
import javax.net.ssl.SSLContext
import javax.net.ssl.X509TrustManager
class Neumanga : ParsedHttpSource() {
@ -244,5 +248,4 @@ class Neumanga : ParsedHttpSource() {
Genre("Echi", "Echi"),
Genre("4-Koma", "4-Koma")
)
}

View File

@ -2,21 +2,13 @@ package eu.kanade.tachiyomi.extension.id.ngomik
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import org.jsoup.select.Elements
import java.text.SimpleDateFormat
import java.util.Calendar
import java.util.Locale
class Ngomik : ParsedHttpSource() {

View File

@ -1,16 +1,20 @@
package eu.kanade.tachiyomi.extension.id.pecintakomik
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import java.text.SimpleDateFormat
import java.util.Locale
import okhttp3.HttpUrl
import okhttp3.OkHttpClient
import okhttp3.Request
import org.jsoup.Jsoup
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import java.text.SimpleDateFormat
import java.util.*
class PecintaKomik : ParsedHttpSource() {

View File

@ -2,15 +2,22 @@ package eu.kanade.tachiyomi.extension.it.hentaifantasy
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.POST
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import okhttp3.*
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import java.text.ParseException
import java.text.SimpleDateFormat
import java.util.Calendar
import java.util.regex.Pattern
import okhttp3.FormBody
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
class HentaiFantasy : ParsedHttpSource() {
override val name = "HentaiFantasy"
@ -35,8 +42,8 @@ class HentaiFantasy : ParsedHttpSource() {
override fun popularMangaSelector() = "div.list > div.group > div.title > a"
override fun popularMangaRequest(page: Int)
= GET("$baseUrl/most_downloaded/$page/", headers)
override fun popularMangaRequest(page: Int) =
GET("$baseUrl/most_downloaded/$page/", headers)
override fun popularMangaFromElement(element: Element): SManga {
val manga = SManga.create()
@ -49,8 +56,8 @@ class HentaiFantasy : ParsedHttpSource() {
override fun latestUpdatesSelector() = popularMangaSelector()
override fun latestUpdatesRequest(page: Int)
= GET("$baseUrl/latest/$page/", headers)
override fun latestUpdatesRequest(page: Int) =
GET("$baseUrl/latest/$page/", headers)
override fun latestUpdatesFromElement(element: Element): SManga {
return popularMangaFromElement(element)
@ -68,7 +75,7 @@ class HentaiFantasy : ParsedHttpSource() {
is TagList -> filter.state
.filter { it.state }
.map {
paths.add(it.name.toLowerCase().replace(" ", "_"));
paths.add(it.name.toLowerCase().replace(" ", "_"))
it.id.toString()
}
.forEach { tags.add(it) }
@ -93,12 +100,12 @@ class HentaiFantasy : ParsedHttpSource() {
var searchPath = if (!searchTags) {
"search"
} else if (paths.size == 1) {
"tag/${paths[0]}/${page}"
"tag/${paths[0]}/$page"
} else {
"search_tags"
}
return POST("${baseUrl}/${searchPath}", headers, form.build())
return POST("$baseUrl/$searchPath", headers, form.build())
}
override fun searchMangaFromElement(element: Element): SManga {

View File

@ -5,7 +5,11 @@ import com.github.salomonbrys.kotson.get
import com.google.gson.Gson
import com.google.gson.JsonObject
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import okhttp3.Headers
@ -143,5 +147,4 @@ class ItaScan : ParsedHttpSource() {
override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException("Not used")
override fun getFilterList() = FilterList()
}

View File

@ -1,15 +1,20 @@
package eu.kanade.tachiyomi.extension.it.mangaeden
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import java.text.ParseException
import java.text.SimpleDateFormat
import java.util.Calendar
import java.util.Locale
import okhttp3.HttpUrl
import okhttp3.Request
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import java.text.ParseException
import java.text.SimpleDateFormat
import java.util.*
class Mangaeden : ParsedHttpSource() {

View File

@ -78,5 +78,4 @@ class NovelleLeggere : ParsedHttpSource() {
override fun imageUrlParse(document: Document): String =
throw Exception("ImgURL Parse Not Used")
}

View File

@ -1,15 +1,20 @@
package eu.kanade.tachiyomi.extension.it.perveden
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import java.text.ParseException
import java.text.SimpleDateFormat
import java.util.Calendar
import java.util.Locale
import okhttp3.HttpUrl
import okhttp3.Request
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import java.text.ParseException
import java.text.SimpleDateFormat
import java.util.*
class Perveden : ParsedHttpSource() {

View File

@ -1,9 +1,15 @@
package eu.kanade.tachiyomi.extension.ja.nikkangecchan
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import okhttp3.*
import okhttp3.Headers
import okhttp3.Request
import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import rx.Observable
@ -51,8 +57,8 @@ class Nikkangecchan : ParsedHttpSource() {
}
// Does not have search, use complete list (in popular) instead.
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request
= popularMangaRequest(page)
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request =
popularMangaRequest(page)
override fun searchMangaSelector() = popularMangaSelector()
@ -74,8 +80,8 @@ class Nikkangecchan : ParsedHttpSource() {
override fun chapterListSelector(): String = ".episodeBox"
override fun chapterListParse(response: Response): List<SChapter>
= super.chapterListParse(response).reversed()
override fun chapterListParse(response: Response): List<SChapter> =
super.chapterListParse(response).reversed()
override fun chapterFromElement(element: Element): SChapter {
val episodePage = element.select(".episode-page").first()

View File

@ -1,14 +1,22 @@
package eu.kanade.tachiyomi.extension.ja.rawdevart
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import okhttp3.*
import java.text.SimpleDateFormat
import java.util.Date
import java.util.Locale
import okhttp3.HttpUrl
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import java.text.SimpleDateFormat
import java.util.*
class Rawdevart : ParsedHttpSource() {

View File

@ -1,18 +1,22 @@
package eu.kanade.tachiyomi.extension.ja.rawkuma
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import java.text.ParseException
import java.text.SimpleDateFormat
import java.util.Locale
import okhttp3.HttpUrl
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import java.text.ParseException
import java.text.SimpleDateFormat
import java.util.Locale
class Rawkuma : ParsedHttpSource() {

View File

@ -2,13 +2,17 @@ package eu.kanade.tachiyomi.extension.ja.senmanga
import android.annotation.SuppressLint
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import java.util.Calendar
import okhttp3.HttpUrl
import okhttp3.Request
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import java.util.Calendar
/**
* Sen Manga source
@ -156,8 +160,8 @@ class SenManga : ParsedHttpSource() {
}
}
override fun imageUrlParse(document: Document)
= throw UnsupportedOperationException("This method should not be called!")
override fun imageUrlParse(document: Document) =
throw UnsupportedOperationException("This method should not be called!")
override fun getFilterList() = FilterList(
GenreFilter(getGenreList()),

View File

@ -10,20 +10,32 @@ import com.github.salomonbrys.kotson.string
import com.google.gson.JsonObject
import com.google.gson.JsonParser
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import okhttp3.*
import java.io.ByteArrayOutputStream
import java.io.InputStream
import java.text.ParseException
import java.text.SimpleDateFormat
import java.util.Calendar
import java.util.Locale
import kotlin.math.floor
import okhttp3.Headers
import okhttp3.HttpUrl
import okhttp3.Interceptor
import okhttp3.MediaType
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.Response
import okhttp3.ResponseBody
import org.jsoup.Jsoup
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import java.io.ByteArrayOutputStream
import java.io.InputStream
import java.lang.Exception
import java.text.ParseException
import java.text.SimpleDateFormat
import java.util.*
import kotlin.math.floor
class ShonenJumpPlus : ParsedHttpSource() {

View File

@ -1,16 +1,20 @@
package eu.kanade.tachiyomi.extension.ko.jmana
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import java.text.SimpleDateFormat
import java.util.Locale
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import java.text.SimpleDateFormat
import java.util.*
/**
* JMana Source

View File

@ -2,7 +2,7 @@ package eu.kanade.tachiyomi.extension.ko.mangashowme
import org.json.JSONArray
internal class CDNUrlHandler(scripts: String) {
internal class MMCDNUrlHandler(scripts: String) {
private val domains = JSONArray("[${scripts.substringBetween("var cdn_domains = [", "];")}]")
private val chapter = scripts.substringBetween("var chapter = ", ";")
.toIntOrNull() ?: 0

View File

@ -6,7 +6,6 @@ import eu.kanade.tachiyomi.source.model.FilterList
import okhttp3.HttpUrl
import okhttp3.Request
// TODO: Completely Implement/Update Filters(Genre/Artist).
private class TextField(name: String, val key: String) : Filter.Text(name)
@ -19,7 +18,6 @@ private class SearchNamingList : Filter.Select<String>("Naming", searchNaming())
private class SearchStatusList : Filter.Select<String>("Status", searchStatus())
private class SearchOrderList : Filter.Select<String>("Order", order())
// [`"Not Set"`, ...[...document.querySelectorAll(".categories ul[data-type='1'] li")].map((el, i) => `"${el.innerText.trim()}"`)].join(',\n')
private fun searchNaming() = arrayOf(
"Not Set",

View File

@ -4,10 +4,6 @@ import android.graphics.Bitmap
import android.graphics.BitmapFactory
import android.graphics.Canvas
import android.graphics.Rect
import okhttp3.Interceptor
import okhttp3.MediaType
import okhttp3.Response
import okhttp3.ResponseBody
import java.io.ByteArrayOutputStream
import java.io.IOException
import java.io.InputStream
@ -15,7 +11,10 @@ import kotlin.math.cos
import kotlin.math.floor
import kotlin.math.sin
import kotlin.math.tan
import okhttp3.Interceptor
import okhttp3.MediaType
import okhttp3.Response
import okhttp3.ResponseBody
/*
* `v1` means url padding of image host.
@ -34,7 +33,6 @@ internal class ImageDecoder(scripts: String) {
}
}
internal class ImageDecoderInterceptor : Interceptor {
override fun intercept(chain: Interceptor.Chain): Response {
val req = chain.request()

View File

@ -13,10 +13,23 @@ import eu.kanade.tachiyomi.extension.BuildConfig
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.asObservableSuccess
import eu.kanade.tachiyomi.source.ConfigurableSource
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import okhttp3.*
import java.io.IOException
import java.text.SimpleDateFormat
import java.util.Calendar
import java.util.concurrent.CompletableFuture
import java.util.concurrent.TimeUnit
import okhttp3.Call
import okhttp3.Callback
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.Response
import org.json.JSONArray
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
@ -24,12 +37,6 @@ import org.jsoup.select.Elements
import rx.Observable
import uy.kohesive.injekt.Injekt
import uy.kohesive.injekt.api.get
import java.io.IOException
import java.text.SimpleDateFormat
import java.util.*
import java.util.concurrent.CompletableFuture
import java.util.concurrent.TimeUnit
/**
* ManaMoa Source
@ -118,7 +125,6 @@ class ManaMoa : ConfigurableSource, ParsedHttpSource() {
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request =
searchComplexFilterMangaRequestBuilder(baseUrl, page, query, filters)
override fun mangaDetailsParse(document: Document): SManga {
val info = document.select("div.left-info").first()
val thumbnailElement = info.select("div.manga-thumbnail").first()
@ -218,7 +224,6 @@ class ManaMoa : ConfigurableSource, ParsedHttpSource() {
}
}
// They are using full url in every links.
// There's possibility to using another domain for serve manga(s). Like marumaru.
// override fun pageListRequest(chapter: SChapter) = GET(chapter.url, headers)
@ -227,7 +232,7 @@ class ManaMoa : ConfigurableSource, ParsedHttpSource() {
try {
val element = document.toString()
val cdnHandler = CDNUrlHandler(element)
val cdnHandler = MMCDNUrlHandler(element)
val imageUrl = element.substringBetween("var img_list = [", "];")
val imageUrls = cdnHandler.replace(JSONArray("[$imageUrl]"))
@ -276,7 +281,6 @@ class ManaMoa : ConfigurableSource, ParsedHttpSource() {
return GET(page.imageUrl!!, requestHeaders)
}
// Latest not supported
override fun latestUpdatesSelector() = ".post-row > div.media.post-list"
@ -302,7 +306,6 @@ class ManaMoa : ConfigurableSource, ParsedHttpSource() {
override fun latestUpdatesRequest(page: Int) = GET("$baseUrl/bbs/board.php?bo_table=manga" + if (page > 1) "&page=$page" else "")
override fun latestUpdatesNextPageSelector() = "ul.pagination > li:not(.disabled)"
// We are able to get the image URL directly from the page list
override fun imageUrlParse(document: Document) = throw UnsupportedOperationException("This method should not be called!")
@ -486,7 +489,6 @@ class ManaMoa : ConfigurableSource, ParsedHttpSource() {
}
}
private fun getPrefBaseUrl(): String = preferences.getString(BASE_URL_PREF, defaultBaseUrl)!!
private fun getExperimentLatest(): Boolean = preferences.getBoolean(EXPERIMENTAL_LATEST_PREF, false)

View File

@ -31,5 +31,4 @@ class ManaMoaUrlActivity : Activity() {
finish()
exitProcess(0)
}
}

View File

@ -5,11 +5,11 @@ import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.util.asJsoup
import okhttp3.Response
import org.jsoup.nodes.Element
import java.text.SimpleDateFormat
import java.util.Calendar
import java.util.Locale
import okhttp3.Response
import org.jsoup.nodes.Element
class NaverWebtoon : NaverComicBase("webtoon") {
override val name = "Naver Webtoon"

View File

@ -8,14 +8,14 @@ import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import java.text.SimpleDateFormat
import java.util.Calendar
import java.util.Locale
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import java.text.SimpleDateFormat
import java.util.Calendar
import java.util.Locale
abstract class NaverComicBase(protected val mType: String) : ParsedHttpSource() {
override val lang: String = "ko"

View File

@ -9,9 +9,15 @@ import android.widget.Toast
import eu.kanade.tachiyomi.extension.BuildConfig
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.ConfigurableSource
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import java.text.SimpleDateFormat
import java.util.Calendar
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.Response
@ -19,8 +25,6 @@ import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import uy.kohesive.injekt.Injekt
import uy.kohesive.injekt.api.get
import java.text.SimpleDateFormat
import java.util.*
/**
* NewToki Source
@ -31,7 +35,6 @@ open class NewToki(override val name: String, private val defaultBaseUrl: String
override val supportsLatest = true
override val client: OkHttpClient = network.cloudflareClient
override fun popularMangaSelector() = "div#webtoon-list > ul > li"
override fun popularMangaFromElement(element: Element): SManga {
@ -71,7 +74,6 @@ open class NewToki(override val name: String, private val defaultBaseUrl: String
override fun searchMangaParse(response: Response) = popularMangaParse(response)
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request = GET("$baseUrl/$boardName" + (if (page > 1) "/p$page" else "") + "?stx=$query")
override fun mangaDetailsParse(document: Document): SManga {
val info = document.select("div.view-title > .view-content").first()
val title = document.select("div.view-content > span > b").text()
@ -161,7 +163,6 @@ open class NewToki(override val name: String, private val defaultBaseUrl: String
}
}
override fun pageListParse(document: Document): List<Page> {
val pages = mutableListOf<Page>()
try {
@ -181,14 +182,12 @@ open class NewToki(override val name: String, private val defaultBaseUrl: String
return pages
}
override fun latestUpdatesSelector() = popularMangaSelector()
override fun latestUpdatesFromElement(element: Element) = popularMangaFromElement(element)
override fun latestUpdatesRequest(page: Int) = popularMangaRequest(page)
override fun latestUpdatesNextPageSelector() = popularMangaNextPageSelector()
override fun latestUpdatesParse(response: Response) = popularMangaParse(response)
// We are able to get the image URL directly from the page list
override fun imageUrlParse(document: Document) = throw UnsupportedOperationException("This method should not be called!")

View File

@ -5,11 +5,11 @@ import eu.kanade.tachiyomi.source.Source
import eu.kanade.tachiyomi.source.SourceFactory
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import java.text.SimpleDateFormat
import java.util.Date
import java.util.Locale
import okhttp3.HttpUrl
import okhttp3.Request
import java.text.SimpleDateFormat
import java.util.Locale
import java.util.Date
/**
* Source changes domain names approximately once every 10 days (e.g. newtoki31.net to newtoki32.net)

View File

@ -6,16 +6,21 @@ import com.github.salomonbrys.kotson.string
import com.google.gson.JsonObject
import com.google.gson.JsonParser
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import okhttp3.*
import org.jsoup.Jsoup
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import rx.Observable
import java.text.ParseException
import java.text.SimpleDateFormat
import java.util.Locale
import okhttp3.Headers
import okhttp3.HttpUrl
import okhttp3.Request
import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
class AnimaRegia : ParsedHttpSource() {

View File

@ -7,8 +7,16 @@ import com.google.gson.JsonArray
import com.google.gson.JsonParser
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.asObservableSuccess
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import java.text.ParseException
import java.text.SimpleDateFormat
import java.util.Locale
import java.util.concurrent.TimeUnit
import okhttp3.Headers
import okhttp3.OkHttpClient
import okhttp3.Request
@ -16,10 +24,6 @@ import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import rx.Observable
import java.text.ParseException
import java.text.SimpleDateFormat
import java.util.*
import java.util.concurrent.TimeUnit
class CentralDeMangas : ParsedHttpSource() {

View File

@ -2,15 +2,21 @@ package eu.kanade.tachiyomi.extension.pt.goldenmangas
import android.util.Log
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import okhttp3.*
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import java.text.ParseException
import java.text.SimpleDateFormat
import java.util.*
import java.util.Locale
import java.util.concurrent.TimeUnit
import okhttp3.Headers
import okhttp3.HttpUrl
import okhttp3.OkHttpClient
import okhttp3.Request
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
class GoldenMangas : ParsedHttpSource() {

View File

@ -1,20 +1,32 @@
package eu.kanade.tachiyomi.extension.pt.hipercool
import com.github.salomonbrys.kotson.*
import com.github.salomonbrys.kotson.array
import com.github.salomonbrys.kotson.get
import com.github.salomonbrys.kotson.int
import com.github.salomonbrys.kotson.jsonObject
import com.github.salomonbrys.kotson.obj
import com.github.salomonbrys.kotson.string
import com.google.gson.JsonArray
import com.google.gson.JsonObject
import com.google.gson.JsonParser
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.POST
import eu.kanade.tachiyomi.network.asObservableSuccess
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.HttpSource
import okhttp3.*
import rx.Observable
import java.lang.Exception
import java.text.ParseException
import java.text.SimpleDateFormat
import java.util.*
import java.util.Locale
import okhttp3.Headers
import okhttp3.MediaType
import okhttp3.Request
import okhttp3.RequestBody
import okhttp3.Response
import rx.Observable
class Hipercool : HttpSource() {
override val name = "HipercooL"
@ -215,11 +227,11 @@ class Hipercool : HttpSource() {
}
}
private fun getThumbnailUrl(bookSlug: String, revision: Int): String
= "$STATIC_URL/books/$bookSlug/$bookSlug-cover.jpg?revision=$revision"
private fun getThumbnailUrl(bookSlug: String, revision: Int): String =
"$STATIC_URL/books/$bookSlug/$bookSlug-cover.jpg?revision=$revision"
private fun getPageUrl(bookSlug: String, chapterSlug: String, page: Int, revision: Int): String
= "$STATIC_URL/books/$bookSlug/$chapterSlug/$bookSlug-chapter-$chapterSlug-page-$page.jpg?revision=$revision"
private fun getPageUrl(bookSlug: String, chapterSlug: String, page: Int, revision: Int): String =
"$STATIC_URL/books/$bookSlug/$chapterSlug/$bookSlug-chapter-$chapterSlug-page-$page.jpg?revision=$revision"
private fun Response.asJsonObject(): JsonObject = JSON_PARSER.parse(body()!!.string()).obj

View File

@ -2,7 +2,11 @@ package eu.kanade.tachiyomi.extension.pt.hqdragon
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.POST
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import okhttp3.FormBody
@ -157,5 +161,4 @@ class HQDragon : ParsedHttpSource() {
override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException("Not used")
override fun getFilterList() = FilterList()
}

View File

@ -5,7 +5,12 @@ import com.github.salomonbrys.kotson.get
import com.google.gson.Gson
import com.google.gson.JsonObject
import eu.kanade.tachiyomi.network.POST
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.HttpSource
import okhttp3.OkHttpClient
import okhttp3.Request

View File

@ -1,8 +1,14 @@
package eu.kanade.tachiyomi.extension.pt.mangahost
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import java.text.ParseException
import java.text.SimpleDateFormat
import java.util.Locale
import okhttp3.Headers
import okhttp3.HttpUrl
import okhttp3.Request
@ -10,9 +16,6 @@ import org.jsoup.Jsoup
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import org.jsoup.select.Elements
import java.text.ParseException
import java.text.SimpleDateFormat
import java.util.Locale
class MangaHost : ParsedHttpSource() {
@ -104,9 +107,8 @@ class MangaHost : ParsedHttpSource() {
else -> SManga.UNKNOWN
}
override fun chapterListSelector(): String
= "ul.list_chapters li a, " +
"table.table-hover:not(.table-mangas) > tbody > tr"
override fun chapterListSelector(): String =
"ul.list_chapters li a, table.table-hover:not(.table-mangas) > tbody > tr"
override fun chapterFromElement(element: Element): SChapter {
val isNewLayout = element.tagName() == "a"

View File

@ -7,9 +7,17 @@ import com.google.gson.JsonObject
import com.google.gson.JsonParser
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.POST
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.HttpSource
import eu.kanade.tachiyomi.util.asJsoup
import java.text.ParseException
import java.text.SimpleDateFormat
import java.util.Locale
import java.util.concurrent.TimeUnit
import okhttp3.FormBody
import okhttp3.Headers
import okhttp3.HttpUrl
@ -19,11 +27,6 @@ import okhttp3.Request
import okhttp3.Response
import org.jsoup.nodes.Element
import rx.Observable
import java.lang.Exception
import java.text.ParseException
import java.text.SimpleDateFormat
import java.util.Locale
import java.util.concurrent.TimeUnit
abstract class MangasProject(
override val name: String,

View File

@ -2,7 +2,11 @@ package eu.kanade.tachiyomi.extension.pt.mangayabu
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.POST
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import okhttp3.FormBody
import okhttp3.Headers

View File

@ -1,7 +1,11 @@
package eu.kanade.tachiyomi.extension.pt.saikaiscan
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import okhttp3.Headers
import okhttp3.HttpUrl
@ -132,5 +136,4 @@ class SaikaiScan : ParsedHttpSource() {
private const val USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.92 Safari/537.36"
private val CHAPTER_REGEX = "Capítulo (\\d+)".toRegex()
}
}

View File

@ -1,13 +1,42 @@
package eu.kanade.tachiyomi.extension.pt.superhentais
import com.github.salomonbrys.kotson.*
import com.github.salomonbrys.kotson.array
import com.github.salomonbrys.kotson.int
import com.github.salomonbrys.kotson.jsonArray
import com.github.salomonbrys.kotson.jsonObject
import com.github.salomonbrys.kotson.obj
import com.github.salomonbrys.kotson.string
import com.google.gson.JsonObject
import com.google.gson.JsonParser
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.POST
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.collections.component1
import kotlin.collections.component2
import kotlin.collections.emptyList
import kotlin.collections.first
import kotlin.collections.forEach
import kotlin.collections.isNotEmpty
import kotlin.collections.joinToString
import kotlin.collections.listOf
import kotlin.collections.map
import kotlin.collections.mapIndexed
import kotlin.collections.mapOf
import kotlin.collections.mutableListOf
import kotlin.collections.plus
import kotlin.collections.plusAssign
import kotlin.collections.set
import kotlin.collections.toMutableMap
import kotlin.collections.toTypedArray
import okhttp3.FormBody
import okhttp3.Headers
import okhttp3.HttpUrl

View File

@ -8,8 +8,16 @@ import com.google.gson.JsonParser
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.POST
import eu.kanade.tachiyomi.network.asObservableSuccess
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import java.text.ParseException
import java.text.SimpleDateFormat
import java.util.Locale
import java.util.concurrent.TimeUnit
import okhttp3.FormBody
import okhttp3.Headers
import okhttp3.HttpUrl
@ -19,10 +27,6 @@ import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import rx.Observable
import java.text.ParseException
import java.text.SimpleDateFormat
import java.util.Locale
import java.util.concurrent.TimeUnit
class UnionMangas : ParsedHttpSource() {
@ -131,7 +135,6 @@ class UnionMangas : ParsedHttpSource() {
val imgThumbnail = infoElement.select(".img-thumbnail").first()
val elTitle = infoElement.select("h2").first()
return SManga.create().apply {
title = elTitle!!.text().withoutLanguage()
author = elAuthor?.textWithoutLabel()

View File

@ -1,15 +1,22 @@
package eu.kanade.tachiyomi.extension.pt.zinnes
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import okhttp3.*
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import java.text.ParseException
import java.text.SimpleDateFormat
import java.util.*
import java.util.Locale
import okhttp3.Headers
import okhttp3.HttpUrl
import okhttp3.Request
import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
class Zinnes : ParsedHttpSource() {

View File

@ -1,14 +1,18 @@
package eu.kanade.tachiyomi.extension.ru.acomics
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import java.net.URLEncoder
import okhttp3.Request
import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import java.net.URLEncoder
class AComics : ParsedHttpSource() {
@ -18,15 +22,16 @@ class AComics : ParsedHttpSource() {
override val lang = "ru"
val cookiesHeader by lazy {
private val cookiesHeader by lazy {
val cookies = mutableMapOf<String, String>()
cookies.put("ageRestrict", "17")
cookies["ageRestrict"] = "17"
buildCookies(cookies)
}
fun buildCookies(cookies: Map<String, String>) = cookies.entries.map {
private fun buildCookies(cookies: Map<String, String>) =
cookies.entries.joinToString(separator = "; ", postfix = ";") {
"${URLEncoder.encode(it.key, "UTF-8")}=${URLEncoder.encode(it.value, "UTF-8")}"
}.joinToString(separator = "; ", postfix = ";")
}
override val client = network.client.newBuilder()
.addNetworkInterceptor { chain ->
@ -39,7 +44,6 @@ class AComics : ParsedHttpSource() {
chain.proceed(newReq)
}.build()!!
override val supportsLatest = true
override fun popularMangaRequest(page: Int): Request =
@ -114,7 +118,6 @@ class AComics : ParsedHttpSource() {
override fun searchMangaNextPageSelector() = popularMangaNextPageSelector()
override fun mangaDetailsParse(document: Document): SManga {
val infoElement = document.select(".about-summary").first()
val manga = SManga.create()
@ -149,7 +152,6 @@ class AComics : ParsedHttpSource() {
override fun pageListParse(document: Document): List<Page> {
val imageElement = document.select("img#mainImage").first()
return listOf(Page(0, imageUrl = baseUrl + imageElement.attr("src")))
}
override fun imageUrlParse(document: Document) = ""
@ -168,7 +170,6 @@ class AComics : ParsedHttpSource() {
Rating("18+", 6)
))
override fun getFilterList() = FilterList(
Status(),
RatingList(),
@ -190,5 +191,4 @@ class AComics : ParsedHttpSource() {
Genre("Стимпанк", 12),
Genre("Супергерои", 13)
)
}

View File

@ -1,16 +1,22 @@
package eu.kanade.tachiyomi.extension.ru.anibe
import com.github.salomonbrys.kotson.fromJson
import com.github.salomonbrys.kotson.get
import com.github.salomonbrys.kotson.keys
import com.google.gson.Gson
import com.google.gson.JsonObject
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import com.google.gson.Gson
import com.github.salomonbrys.kotson.*
import okhttp3.Response
import com.google.gson.JsonObject
class Anibe : ParsedHttpSource() {
@ -160,5 +166,4 @@ class Anibe : ParsedHttpSource() {
override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException("Not used")
override fun getFilterList() = FilterList()
}

View File

@ -9,7 +9,13 @@ import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import okhttp3.*
import okhttp3.Cookie
import okhttp3.CookieJar
import okhttp3.FormBody
import okhttp3.Headers
import okhttp3.HttpUrl
import okhttp3.Request
import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
@ -38,7 +44,6 @@ class ComX : ParsedHttpSource() {
.build())
}
}
})
.build()
@ -50,11 +55,9 @@ class ComX : ParsedHttpSource() {
override fun latestUpdatesSelector() = "ul.last-comix li"
override fun popularMangaRequest(page: Int): Request =
GET("$baseUrl/comix/page/$page/", headers)
override fun popularMangaRequest(page: Int): Request = GET("$baseUrl/comix/page/$page/", headers)
override fun latestUpdatesRequest(page: Int): Request =
GET(baseUrl, headers)
override fun latestUpdatesRequest(page: Int): Request = GET(baseUrl, headers)
override fun popularMangaFromElement(element: Element): SManga {
val manga = SManga.create()
@ -76,7 +79,6 @@ class ComX : ParsedHttpSource() {
return manga
}
override fun popularMangaNextPageSelector() = "div.nextprev:last-child"
override fun latestUpdatesNextPageSelector(): Nothing? = null
@ -192,7 +194,6 @@ class ComX : ParsedHttpSource() {
val urls: List<String> = html.substring(beginIndex + beginTag.length, endIndex)
.split(',')
val pages = mutableListOf<Page>()
for (i in urls.indices) {
pages.add(Page(i, "", link + (urls[i].removeSurrounding("'"))))

View File

@ -1,14 +1,19 @@
package eu.kanade.tachiyomi.extension.ru.desu
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.HttpSource
import java.util.ArrayList
import okhttp3.Headers
import okhttp3.Request
import okhttp3.Response
import org.json.JSONArray
import org.json.JSONObject
import java.util.*
class Desu : HttpSource() {
override val name = "Desu"
@ -59,7 +64,6 @@ class Desu : HttpSource() {
}
}
override fun popularMangaRequest(page: Int) = GET("$baseUrl/?limit=50&order=popular&page=$page")
override fun popularMangaParse(response: Response) = searchMangaParse(response)
@ -144,8 +148,8 @@ class Desu : HttpSource() {
return ret
}
override fun imageUrlParse(response: Response)
= throw UnsupportedOperationException("This method should not be called!")
override fun imageUrlParse(response: Response) =
throw UnsupportedOperationException("This method should not be called!")
private class OrderBy : Filter.Select<String>("Сортировка",
arrayOf("Популярность", "Дата", "Имя"))

View File

@ -8,19 +8,23 @@ import com.google.gson.JsonArray
import com.google.gson.JsonObject
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import java.net.URL
import java.text.SimpleDateFormat
import java.util.Date
import java.util.Locale
import okhttp3.Headers
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import java.net.URL
import java.text.SimpleDateFormat
import java.util.*
class Henchan : ParsedHttpSource() {

View File

@ -4,25 +4,40 @@ import android.app.Application
import android.content.SharedPreferences
import android.support.v7.preference.ListPreference
import android.support.v7.preference.PreferenceScreen
import com.github.salomonbrys.kotson.*
import android.util.Base64.decode as base64Decode
import com.github.salomonbrys.kotson.array
import com.github.salomonbrys.kotson.get
import com.github.salomonbrys.kotson.int
import com.github.salomonbrys.kotson.nullArray
import com.github.salomonbrys.kotson.nullInt
import com.github.salomonbrys.kotson.nullString
import com.github.salomonbrys.kotson.obj
import com.github.salomonbrys.kotson.string
import com.google.gson.JsonElement
import com.google.gson.JsonParser
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.POST
import eu.kanade.tachiyomi.network.asObservableSuccess
import eu.kanade.tachiyomi.source.ConfigurableSource
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.HttpSource
import eu.kanade.tachiyomi.util.asJsoup
import okhttp3.*
import java.text.SimpleDateFormat
import java.util.Locale
import okhttp3.Headers
import okhttp3.HttpUrl
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.Response
import org.jsoup.nodes.Element
import rx.Observable
import uy.kohesive.injekt.Injekt
import uy.kohesive.injekt.api.get
import java.text.SimpleDateFormat
import java.util.*
import android.util.Base64.decode as base64Decode
class LibManga : ConfigurableSource, HttpSource() {
@ -209,12 +224,11 @@ class LibManga : ConfigurableSource, HttpSource() {
val teams = jsonParser.parse(element.attr("data-teams"))
val team = teams[0]["slug"].nullString
val baseUrl = "${element.baseUri()}/v$volume/c$number"
val url = if (team != null) "${baseUrl}/$team" else baseUrl
val url = if (team != null) "$baseUrl/$team" else baseUrl
chapter.setUrlWithoutDomain(url)
}
chapter.name = element.select("div.chapter-item__name").first().text()
chapter.date_upload = SimpleDateFormat("dd.MM.yyyy", Locale.US)
.parse(element.select("div.chapter-item__date").text()).time

View File

@ -2,16 +2,21 @@ package eu.kanade.tachiyomi.extension.ru.mangachan
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import java.text.SimpleDateFormat
import java.util.Locale
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import java.text.SimpleDateFormat
import java.util.*
class Mangachan : ParsedHttpSource() {
@ -30,7 +35,6 @@ class Mangachan : ParsedHttpSource() {
override val client: OkHttpClient = network.client.newBuilder()
.addNetworkInterceptor(rateLimitInterceptor).build()
override fun popularMangaRequest(page: Int): Request =
GET("$baseUrl/mostfavorites?offset=${20 * (page - 1)}", headers)
@ -226,14 +230,12 @@ class Mangachan : ParsedHttpSource() {
arrayOf("Дата", "Популярность", "Имя", "Главы"),
Filter.Sort.Selection(1, false))
override fun getFilterList() = FilterList(
Status(),
OrderBy(),
GenreList(getGenreList())
)
/* [...document.querySelectorAll("li.sidetag > a:nth-child(1)")]
* .map(el => `Genre("${el.getAttribute('href').substr(6)}")`).join(',\n')
* on https://mangachan.me/

View File

@ -9,13 +9,13 @@ import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import java.text.SimpleDateFormat
import java.util.Locale
import okhttp3.FormBody
import okhttp3.OkHttpClient
import okhttp3.Request
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import java.text.SimpleDateFormat
import java.util.Locale
class Mangaclub : ParsedHttpSource() {
@ -97,7 +97,6 @@ class Mangaclub : ParsedHttpSource() {
override fun searchMangaSelector(): String = popularMangaSelector()
override fun searchMangaFromElement(element: Element): SManga = popularMangaFromElement(element)
// Details
override fun mangaDetailsParse(document: Document): SManga = SManga.create().apply {
thumbnail_url = document.select("img[title].img-responsive").attr("abs:src")
@ -127,7 +126,6 @@ class Mangaclub : ParsedHttpSource() {
return SimpleDateFormat("dd.MM.yyyy", Locale.US).parse(date)?.time ?: 0
}
// Pages
override fun pageListParse(document: Document): List<Page> = mutableListOf<Page>().apply {
document.select(".manga-lines-page a").forEach {

View File

@ -7,13 +7,13 @@ import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import java.text.SimpleDateFormat
import java.util.Locale
import okhttp3.Headers
import okhttp3.OkHttpClient
import okhttp3.Request
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import java.text.SimpleDateFormat
import java.util.*
open class Mangahub : ParsedHttpSource() {
@ -30,7 +30,6 @@ open class Mangahub : ParsedHttpSource() {
override val client: OkHttpClient = network.client.newBuilder()
.addNetworkInterceptor(rateLimitInterceptor).build()
override fun popularMangaRequest(page: Int): Request =
GET("$baseUrl/explore?filter[sort]=rating&filter[dateStart][left_number]=1900&filter[dateStart][right_number]=2099&page=$page", headers)

View File

@ -6,15 +6,20 @@ import com.github.salomonbrys.kotson.string
import com.google.gson.JsonObject
import com.google.gson.JsonParser
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import java.text.SimpleDateFormat
import java.util.Locale
import okhttp3.Headers
import okhttp3.Request
import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import java.text.SimpleDateFormat
import java.util.*
class MangaOnlineBiz : ParsedHttpSource() {
override val name = "MangaOnlineBiz"
@ -94,7 +99,6 @@ class MangaOnlineBiz : ParsedHttpSource() {
return manga
}
override fun latestUpdatesFromElement(element: Element): SManga =
popularMangaFromElement(element)

View File

@ -3,17 +3,25 @@ package eu.kanade.tachiyomi.extension.ru.mintmanga
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.asObservableSuccess
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import okhttp3.*
import java.text.ParseException
import java.text.SimpleDateFormat
import java.util.Locale
import java.util.regex.Pattern
import okhttp3.Headers
import okhttp3.HttpUrl
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import rx.Observable
import java.text.ParseException
import java.text.SimpleDateFormat
import java.util.*
import java.util.regex.Pattern
class Mintmanga : ParsedHttpSource() {

View File

@ -1,17 +1,20 @@
package eu.kanade.tachiyomi.extension.ru.nudemoon
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import java.net.URLEncoder
import java.text.SimpleDateFormat
import java.util.Locale
import okhttp3.Request
import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import java.net.URLEncoder
import java.text.SimpleDateFormat
import java.util.Locale
class Nudemoon : ParsedHttpSource() {
@ -172,7 +175,6 @@ class Nudemoon : ParsedHttpSource() {
return Regex("""images\[(\d+)].src\s=\s'(http.*)'""").findAll(imgScript).map {
Page(it.groupValues[1].toInt(), imageUrl = it.groupValues[2])
}.toList()
}
override fun imageUrlParse(document: Document) = throw Exception("Not Used")

View File

@ -1,17 +1,21 @@
package eu.kanade.tachiyomi.extension.ru.onlinecomics
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import java.text.SimpleDateFormat
import java.util.Locale
import okhttp3.Headers
import okhttp3.Request
import okhttp3.Response
import org.jsoup.Jsoup
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import java.text.SimpleDateFormat
import java.util.*
class Onlinecomics : ParsedHttpSource() {
override fun searchMangaFromElement(element: Element): SManga {
@ -65,7 +69,6 @@ class Onlinecomics: ParsedHttpSource() {
popularMangaFromElement(element)
}
val hasNextPage = popularMangaNextPageSelector().let { selector ->
document.select(selector).first()
} != null
@ -114,7 +117,6 @@ class Onlinecomics: ParsedHttpSource() {
val result = mangaList.filter { it.url.isNotEmpty() }.distinctBy { it.url }
return MangasPage(result, false)
}
override fun mangaDetailsParse(document: Document): SManga {
@ -146,7 +148,6 @@ class Onlinecomics: ParsedHttpSource() {
manga.description = document.select(".remark").text()
}
return manga
}
private fun parseStatus(element: String): Int = when {
@ -160,7 +161,6 @@ class Onlinecomics: ParsedHttpSource() {
val chapterList = mutableListOf<SChapter>()
chapterList.addAll(document.select(chapterListSelector()).map { chapterFromElement(it) })
val lastPage: String? = document.select("div.navigationG .C").last()?.text()
if (lastPage != null) {
(2..lastPage.toInt()).forEach { i ->

View File

@ -3,17 +3,25 @@ package eu.kanade.tachiyomi.extension.ru.readmanga
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.asObservableSuccess
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import okhttp3.*
import java.text.ParseException
import java.text.SimpleDateFormat
import java.util.Locale
import java.util.regex.Pattern
import okhttp3.Headers
import okhttp3.HttpUrl
import okhttp3.OkHttpClient
import okhttp3.Request
import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import rx.Observable
import java.text.ParseException
import java.text.SimpleDateFormat
import java.util.*
import java.util.regex.Pattern
class Readmanga : ParsedHttpSource() {

View File

@ -20,7 +20,6 @@ import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
class RisensTeam : ParsedHttpSource() {
override fun pageListParse(document: Document): List<Page> = throw Exception("Not Used")

View File

@ -1,18 +1,22 @@
package eu.kanade.tachiyomi.extension.ru.selfmanga
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import java.text.ParseException
import java.text.SimpleDateFormat
import java.util.Locale
import java.util.regex.Pattern
import okhttp3.Headers
import okhttp3.HttpUrl
import okhttp3.Request
import okhttp3.Response
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import java.text.ParseException
import java.text.SimpleDateFormat
import java.util.*
import java.util.regex.Pattern
class Selfmanga : ParsedHttpSource() {
@ -196,7 +200,6 @@ class Selfmanga : ParsedHttpSource() {
GenreList(getGenreList())
)
private fun getCategoryList() = listOf(
Genre("Артбук", "el_5894"),
Genre("Веб", "el_2160"),

View File

@ -1,8 +1,9 @@
package eu.kanade.tachiyomi.extension.th.nekopost
import org.jsoup.nodes.Element
import java.text.SimpleDateFormat
import java.util.*
import java.util.ArrayList
import java.util.Locale
import org.jsoup.nodes.Element
class NPArrayList<E>(c: Collection<E>, val mangaList: List<Element>) : ArrayList<E>(c) {
override fun isEmpty(): Boolean = mangaList.isEmpty()
@ -12,13 +13,11 @@ class NPArrayList<E>(c: Collection<E>, val mangaList: List<Element>) : ArrayList
fun isListEmpty(): Boolean = super.isEmpty()
fun isListNotEmpty(): Boolean = !isListEmpty()
}
object NPUtils {
private val urlWithoutDomainFromFullUrlRegex: Regex = Regex("^https://www\\.nekopost\\.net/manga/(.*)$")
fun getMangaOrChapterAlias(url: String): String {
val (urlWithoutDomain) = urlWithoutDomainFromFullUrlRegex.find(url)!!.destructured
return urlWithoutDomain

View File

@ -2,9 +2,17 @@ package eu.kanade.tachiyomi.extension.th.nekopost
import eu.kanade.tachiyomi.network.GET
import eu.kanade.tachiyomi.network.asObservableSuccess
import eu.kanade.tachiyomi.source.model.*
import eu.kanade.tachiyomi.source.model.Filter
import eu.kanade.tachiyomi.source.model.FilterList
import eu.kanade.tachiyomi.source.model.MangasPage
import eu.kanade.tachiyomi.source.model.Page
import eu.kanade.tachiyomi.source.model.SChapter
import eu.kanade.tachiyomi.source.model.SManga
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
import eu.kanade.tachiyomi.util.asJsoup
import java.net.URL
import java.util.Calendar
import java.util.Locale
import okhttp3.Request
import okhttp3.Response
import org.json.JSONArray
@ -13,10 +21,6 @@ import org.json.JSONObject
import org.jsoup.nodes.Document
import org.jsoup.nodes.Element
import rx.Observable
import java.net.URL
import java.util.*
import kotlin.collections.ArrayList
import kotlin.collections.HashSet
class Nekopost() : ParsedHttpSource() {
override val baseUrl: String = "https://www.nekopost.net/manga/"

Some files were not shown because too many files have changed in this diff Show More