Lint fixes
This commit is contained in:
parent
5e05175f8c
commit
020c2af006
|
@ -1,7 +1,11 @@
|
||||||
package eu.kanade.tachiyomi.extension.en.myhentaicomics
|
package eu.kanade.tachiyomi.extension.en.myhentaicomics
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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.source.online.ParsedHttpSource
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
|
@ -125,10 +129,10 @@ class MyHentaiComics : ParsedHttpSource() {
|
||||||
override fun getFilterList() = FilterList(
|
override fun getFilterList() = FilterList(
|
||||||
Filter.Header("Cannot combine search types!"),
|
Filter.Header("Cannot combine search types!"),
|
||||||
Filter.Separator("-----------------"),
|
Filter.Separator("-----------------"),
|
||||||
GenreFilter ()
|
GenreFilter()
|
||||||
)
|
)
|
||||||
|
|
||||||
private class GenreFilter: UriPartFilter("Genres",
|
private class GenreFilter : UriPartFilter("Genres",
|
||||||
arrayOf(
|
arrayOf(
|
||||||
Pair("<Choose a genre>", ""),
|
Pair("<Choose a genre>", ""),
|
||||||
Pair("3D", "/index.php/tag/2403"),
|
Pair("3D", "/index.php/tag/2403"),
|
||||||
|
|
|
@ -2,7 +2,12 @@ package eu.kanade.tachiyomi.extension.en.myhentaigallery
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.network.asObservableSuccess
|
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.source.online.ParsedHttpSource
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
|
@ -150,81 +155,81 @@ class MyHentaiGallery : ParsedHttpSource() {
|
||||||
|
|
||||||
private class GenreFilter : UriPartFilter("Category", arrayOf(
|
private class GenreFilter : UriPartFilter("Category", arrayOf(
|
||||||
Pair("<select>", "---"),
|
Pair("<select>", "---"),
|
||||||
Pair("3D Comic","3"),
|
Pair("3D Comic", "3"),
|
||||||
Pair("Ahegao","2740"),
|
Pair("Ahegao", "2740"),
|
||||||
Pair("Anal","2741"),
|
Pair("Anal", "2741"),
|
||||||
Pair("Asian","4"),
|
Pair("Asian", "4"),
|
||||||
Pair("Ass Expansion","5"),
|
Pair("Ass Expansion", "5"),
|
||||||
Pair("Aunt","6"),
|
Pair("Aunt", "6"),
|
||||||
Pair("BBW","7"),
|
Pair("BBW", "7"),
|
||||||
Pair("Beastiality","8"),
|
Pair("Beastiality", "8"),
|
||||||
Pair("Bimbofication","3430"),
|
Pair("Bimbofication", "3430"),
|
||||||
Pair("Bisexual","9"),
|
Pair("Bisexual", "9"),
|
||||||
Pair("Black & Interracial","10"),
|
Pair("Black & Interracial", "10"),
|
||||||
Pair("Body Swap","11"),
|
Pair("Body Swap", "11"),
|
||||||
Pair("Bondage","12"),
|
Pair("Bondage", "12"),
|
||||||
Pair("Breast Expansion","13"),
|
Pair("Breast Expansion", "13"),
|
||||||
Pair("Brother","14"),
|
Pair("Brother", "14"),
|
||||||
Pair("Bukakke","15"),
|
Pair("Bukakke", "15"),
|
||||||
Pair("Catgirl","2742"),
|
Pair("Catgirl", "2742"),
|
||||||
Pair("Cheating","16"),
|
Pair("Cheating", "16"),
|
||||||
Pair("Cousin","17"),
|
Pair("Cousin", "17"),
|
||||||
Pair("Crossdressing","18"),
|
Pair("Crossdressing", "18"),
|
||||||
Pair("Dad","19"),
|
Pair("Dad", "19"),
|
||||||
Pair("Daughter","20"),
|
Pair("Daughter", "20"),
|
||||||
Pair("Dick Growth","21"),
|
Pair("Dick Growth", "21"),
|
||||||
Pair("Ebony","3533"),
|
Pair("Ebony", "3533"),
|
||||||
Pair("Elf","2744"),
|
Pair("Elf", "2744"),
|
||||||
Pair("Exhibitionism","2745"),
|
Pair("Exhibitionism", "2745"),
|
||||||
Pair("Father","22"),
|
Pair("Father", "22"),
|
||||||
Pair("Femdom","23"),
|
Pair("Femdom", "23"),
|
||||||
Pair("Foot Fetish","3253"),
|
Pair("Foot Fetish", "3253"),
|
||||||
Pair("Furry","24"),
|
Pair("Furry", "24"),
|
||||||
Pair("Futanari & Shemale & Dickgirl","25"),
|
Pair("Futanari & Shemale & Dickgirl", "25"),
|
||||||
Pair("Futanari X Female","3416"),
|
Pair("Futanari X Female", "3416"),
|
||||||
Pair("Futanari X Futanari","3415"),
|
Pair("Futanari X Futanari", "3415"),
|
||||||
Pair("Futanari X Male","26"),
|
Pair("Futanari X Male", "26"),
|
||||||
Pair("Gangbang","27"),
|
Pair("Gangbang", "27"),
|
||||||
Pair("Gay & Yaoi","28"),
|
Pair("Gay & Yaoi", "28"),
|
||||||
Pair("Gender Bending","29"),
|
Pair("Gender Bending", "29"),
|
||||||
Pair("Giantess","30"),
|
Pair("Giantess", "30"),
|
||||||
Pair("Gloryhole","31"),
|
Pair("Gloryhole", "31"),
|
||||||
Pair("Hairy Female","3418"),
|
Pair("Hairy Female", "3418"),
|
||||||
Pair("Hardcore","36"),
|
Pair("Hardcore", "36"),
|
||||||
Pair("Harem","37"),
|
Pair("Harem", "37"),
|
||||||
Pair("Incest","38"),
|
Pair("Incest", "38"),
|
||||||
Pair("Inseki","3417"),
|
Pair("Inseki", "3417"),
|
||||||
Pair("Kemonomimi","3368"),
|
Pair("Kemonomimi", "3368"),
|
||||||
Pair("Lactation","39"),
|
Pair("Lactation", "39"),
|
||||||
Pair("Lesbian & Yuri & Girls Only","40"),
|
Pair("Lesbian & Yuri & Girls Only", "40"),
|
||||||
Pair("Milf","41"),
|
Pair("Milf", "41"),
|
||||||
Pair("Mind Break","3419"),
|
Pair("Mind Break", "3419"),
|
||||||
Pair("Mind Control & Hypnosis","42"),
|
Pair("Mind Control & Hypnosis", "42"),
|
||||||
Pair("Mom","43"),
|
Pair("Mom", "43"),
|
||||||
Pair("Mother","44"),
|
Pair("Mother", "44"),
|
||||||
Pair("Muscle Girl","45"),
|
Pair("Muscle Girl", "45"),
|
||||||
Pair("Muscle Growth","46"),
|
Pair("Muscle Growth", "46"),
|
||||||
Pair("Nephew","47"),
|
Pair("Nephew", "47"),
|
||||||
Pair("Niece","48"),
|
Pair("Niece", "48"),
|
||||||
Pair("Orgy","49"),
|
Pair("Orgy", "49"),
|
||||||
Pair("Pegging","50"),
|
Pair("Pegging", "50"),
|
||||||
Pair("Possession","51"),
|
Pair("Possession", "51"),
|
||||||
Pair("Pregnant & Impregnation","52"),
|
Pair("Pregnant & Impregnation", "52"),
|
||||||
Pair("Rape","53"),
|
Pair("Rape", "53"),
|
||||||
Pair("Sister","54"),
|
Pair("Sister", "54"),
|
||||||
Pair("Solo","2746"),
|
Pair("Solo", "2746"),
|
||||||
Pair("Son","55"),
|
Pair("Son", "55"),
|
||||||
Pair("Spanking","56"),
|
Pair("Spanking", "56"),
|
||||||
Pair("Stomach Bulge","57"),
|
Pair("Stomach Bulge", "57"),
|
||||||
Pair("Strap-On","58"),
|
Pair("Strap-On", "58"),
|
||||||
Pair("Superheroes","59"),
|
Pair("Superheroes", "59"),
|
||||||
Pair("Tentacles","60"),
|
Pair("Tentacles", "60"),
|
||||||
Pair("Threesome","61"),
|
Pair("Threesome", "61"),
|
||||||
Pair("Transformation","62"),
|
Pair("Transformation", "62"),
|
||||||
Pair("Uncle","63"),
|
Pair("Uncle", "63"),
|
||||||
Pair("Urination","64"),
|
Pair("Urination", "64"),
|
||||||
Pair("Vore","65"),
|
Pair("Vore", "65"),
|
||||||
Pair("Weight Gain","66")
|
Pair("Weight Gain", "66")
|
||||||
))
|
))
|
||||||
|
|
||||||
private open class UriPartFilter(displayName: String, val vals: Array<Pair<String, String>>) :
|
private open class UriPartFilter(displayName: String, val vals: Array<Pair<String, String>>) :
|
||||||
|
|
|
@ -1,13 +1,17 @@
|
||||||
package eu.kanade.tachiyomi.extension.en.oglaf
|
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 eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
|
import org.jsoup.Jsoup
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import rx.Observable
|
import rx.Observable
|
||||||
import org.jsoup.Jsoup
|
|
||||||
|
|
||||||
class Oglaf : ParsedHttpSource() {
|
class Oglaf : ParsedHttpSource() {
|
||||||
|
|
||||||
|
@ -94,5 +98,4 @@ class Oglaf : ParsedHttpSource() {
|
||||||
override fun latestUpdatesRequest(page: Int): Request = throw Exception("Not used")
|
override fun latestUpdatesRequest(page: Int): Request = throw Exception("Not used")
|
||||||
|
|
||||||
override fun latestUpdatesSelector(): String = throw Exception("Not used")
|
override fun latestUpdatesSelector(): String = throw Exception("Not used")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
package eu.kanade.tachiyomi.extension.en.patchfriday
|
package eu.kanade.tachiyomi.extension.en.patchfriday
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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.source.online.HttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
import eu.kanade.tachiyomi.util.asJsoup
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
|
@ -69,7 +73,7 @@ class PatchFriday : HttpSource() {
|
||||||
val last = response.asJsoup().select("ul.strip_toolbar li a[rel=next]").attr("href")
|
val last = response.asJsoup().select("ul.strip_toolbar li a[rel=next]").attr("href")
|
||||||
.removeSurrounding("/").toInt()
|
.removeSurrounding("/").toInt()
|
||||||
|
|
||||||
return listOf(1 .. last).flatten().reversed().map {
|
return listOf(1..last).flatten().reversed().map {
|
||||||
SChapter.create().apply {
|
SChapter.create().apply {
|
||||||
name = "#$it - "
|
name = "#$it - "
|
||||||
url = "/$it/"
|
url = "/$it/"
|
||||||
|
|
|
@ -1,15 +1,20 @@
|
||||||
package eu.kanade.tachiyomi.extension.en.perveden
|
package eu.kanade.tachiyomi.extension.en.perveden
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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.source.online.ParsedHttpSource
|
||||||
|
import java.text.ParseException
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.Calendar
|
||||||
|
import java.util.Locale
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.text.ParseException
|
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
class Perveden : ParsedHttpSource() {
|
class Perveden : ParsedHttpSource() {
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,12 @@
|
||||||
package eu.kanade.tachiyomi.extension.en.pururin
|
package eu.kanade.tachiyomi.extension.en.pururin
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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.source.online.ParsedHttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
import eu.kanade.tachiyomi.util.asJsoup
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
|
@ -61,8 +66,8 @@ class Pururin : ParsedHttpSource() {
|
||||||
manga.genre = genres.joinToString(", ")
|
manga.genre = genres.joinToString(", ")
|
||||||
manga.thumbnail_url = document.select("div.cover-wrapper v-lazy-image").attr("abs:src")
|
manga.thumbnail_url = document.select("div.cover-wrapper v-lazy-image").attr("abs:src")
|
||||||
|
|
||||||
var tags = ""
|
var tags = ""
|
||||||
genres.forEach { tags+= " <$it>" }
|
genres.forEach { tags += " <$it>" }
|
||||||
|
|
||||||
manga.description = "Title: " + manga.title + "\n\n" + getDesc(document) + tags
|
manga.description = "Title: " + manga.title + "\n\n" + getDesc(document) + tags
|
||||||
|
|
||||||
|
@ -76,7 +81,6 @@ class Pururin : ParsedHttpSource() {
|
||||||
val parodies = infoElement.select("tr:has(td:contains(Parody)) a").text()
|
val parodies = infoElement.select("tr:has(td:contains(Parody)) a").text()
|
||||||
val pagess = infoElement.select("tr:has(td:contains(Pages)) td:eq(1)").text()
|
val pagess = infoElement.select("tr:has(td:contains(Pages)) td:eq(1)").text()
|
||||||
|
|
||||||
|
|
||||||
if (magazine.isNotEmpty()) {
|
if (magazine.isNotEmpty()) {
|
||||||
stringBuilder.append("Magazine: ")
|
stringBuilder.append("Magazine: ")
|
||||||
stringBuilder.append(magazine)
|
stringBuilder.append(magazine)
|
||||||
|
@ -98,7 +102,7 @@ class Pururin : ParsedHttpSource() {
|
||||||
|
|
||||||
override fun chapterListSelector() = "div.gallery-action a"
|
override fun chapterListSelector() = "div.gallery-action a"
|
||||||
|
|
||||||
//TODO Make it work for collections
|
// TODO Make it work for collections
|
||||||
override fun chapterFromElement(element: Element): SChapter {
|
override fun chapterFromElement(element: Element): SChapter {
|
||||||
|
|
||||||
val chapter = SChapter.create()
|
val chapter = SChapter.create()
|
||||||
|
@ -116,8 +120,8 @@ class Pururin : ParsedHttpSource() {
|
||||||
val id = galleryInfo.substringAfter("id":").substringBefore(',')
|
val id = galleryInfo.substringAfter("id":").substringBefore(',')
|
||||||
val total: Int = (galleryInfo.substringAfter("total_pages":").substringBefore(',')).toInt()
|
val total: Int = (galleryInfo.substringAfter("total_pages":").substringBefore(',')).toInt()
|
||||||
|
|
||||||
for (i in 1 .. total) {
|
for (i in 1..total) {
|
||||||
pages.add(Page(i,"", "https://cdn.pururin.io/assets/images/data/$id/$i.jpg"))
|
pages.add(Page(i, "", "https://cdn.pururin.io/assets/images/data/$id/$i.jpg"))
|
||||||
}
|
}
|
||||||
|
|
||||||
return pages
|
return pages
|
||||||
|
@ -185,4 +189,3 @@ class Pururin : ParsedHttpSource() {
|
||||||
|
|
||||||
private class Tag(name: String) : Filter.Text(name)
|
private class Tag(name: String) : Filter.Text(name)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
package eu.kanade.tachiyomi.extension.en.questionablecontent
|
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 eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
|
@ -83,5 +87,4 @@ class QuestionableContent : ParsedHttpSource() {
|
||||||
override fun latestUpdatesRequest(page: Int): Request = throw Exception("Not used")
|
override fun latestUpdatesRequest(page: Int): Request = throw Exception("Not used")
|
||||||
|
|
||||||
override fun latestUpdatesSelector(): String = throw Exception("Not used")
|
override fun latestUpdatesSelector(): String = throw Exception("Not used")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,8 +7,15 @@ import android.support.v7.preference.PreferenceScreen
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.network.POST
|
import eu.kanade.tachiyomi.network.POST
|
||||||
import eu.kanade.tachiyomi.source.ConfigurableSource
|
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.source.online.ParsedHttpSource
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.Locale
|
||||||
|
import java.util.regex.Pattern
|
||||||
import okhttp3.FormBody
|
import okhttp3.FormBody
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
|
@ -17,9 +24,6 @@ import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import uy.kohesive.injekt.Injekt
|
import uy.kohesive.injekt.Injekt
|
||||||
import uy.kohesive.injekt.api.get
|
import uy.kohesive.injekt.api.get
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.Locale
|
|
||||||
import java.util.regex.Pattern
|
|
||||||
|
|
||||||
class Readcomiconline : ConfigurableSource, ParsedHttpSource() {
|
class Readcomiconline : ConfigurableSource, ParsedHttpSource() {
|
||||||
|
|
||||||
|
@ -205,7 +209,7 @@ class Readcomiconline : ConfigurableSource, ParsedHttpSource() {
|
||||||
Genre("Zombies")
|
Genre("Zombies")
|
||||||
)
|
)
|
||||||
// Preferences Code
|
// Preferences Code
|
||||||
|
|
||||||
override fun setupPreferenceScreen(screen: androidx.preference.PreferenceScreen) {
|
override fun setupPreferenceScreen(screen: androidx.preference.PreferenceScreen) {
|
||||||
val qualitypref = androidx.preference.ListPreference(screen.context).apply {
|
val qualitypref = androidx.preference.ListPreference(screen.context).apply {
|
||||||
key = QUALITY_PREF_Title
|
key = QUALITY_PREF_Title
|
||||||
|
@ -224,8 +228,6 @@ class Readcomiconline : ConfigurableSource, ParsedHttpSource() {
|
||||||
screen.addPreference(qualitypref)
|
screen.addPreference(qualitypref)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
override fun setupPreferenceScreen(screen: PreferenceScreen) {
|
override fun setupPreferenceScreen(screen: PreferenceScreen) {
|
||||||
val qualitypref = ListPreference(screen.context).apply {
|
val qualitypref = ListPreference(screen.context).apply {
|
||||||
key = QUALITY_PREF_Title
|
key = QUALITY_PREF_Title
|
||||||
|
|
|
@ -8,17 +8,17 @@ import eu.kanade.tachiyomi.source.model.Page
|
||||||
import eu.kanade.tachiyomi.source.model.SChapter
|
import eu.kanade.tachiyomi.source.model.SChapter
|
||||||
import eu.kanade.tachiyomi.source.model.SManga
|
import eu.kanade.tachiyomi.source.model.SManga
|
||||||
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
||||||
|
import java.util.Calendar
|
||||||
|
import java.util.concurrent.TimeUnit
|
||||||
import okhttp3.FormBody
|
import okhttp3.FormBody
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.util.Calendar
|
|
||||||
import java.util.concurrent.TimeUnit
|
|
||||||
|
|
||||||
class ReadM : ParsedHttpSource() {
|
class ReadM : ParsedHttpSource() {
|
||||||
|
|
||||||
//Info
|
// Info
|
||||||
override val name: String = "ReadM"
|
override val name: String = "ReadM"
|
||||||
override val baseUrl: String = "https://readm.org"
|
override val baseUrl: String = "https://readm.org"
|
||||||
override val lang: String = "en"
|
override val lang: String = "en"
|
||||||
|
@ -30,7 +30,7 @@ class ReadM : ParsedHttpSource() {
|
||||||
.followRedirects(true)
|
.followRedirects(true)
|
||||||
.build()
|
.build()
|
||||||
|
|
||||||
//Popular
|
// Popular
|
||||||
|
|
||||||
override fun popularMangaRequest(page: Int): Request = GET("$baseUrl/popular-manga/$page", headers)
|
override fun popularMangaRequest(page: Int): Request = GET("$baseUrl/popular-manga/$page", headers)
|
||||||
override fun popularMangaNextPageSelector(): String? = "div.pagination a:contains(»)"
|
override fun popularMangaNextPageSelector(): String? = "div.pagination a:contains(»)"
|
||||||
|
@ -41,10 +41,9 @@ class ReadM : ParsedHttpSource() {
|
||||||
title = this.text().trim()
|
title = this.text().trim()
|
||||||
url = this.attr("href")
|
url = this.attr("href")
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Latest
|
// Latest
|
||||||
|
|
||||||
override fun latestUpdatesRequest(page: Int): Request = GET("$baseUrl/latest-releases/$page", headers)
|
override fun latestUpdatesRequest(page: Int): Request = GET("$baseUrl/latest-releases/$page", headers)
|
||||||
override fun latestUpdatesNextPageSelector(): String? = popularMangaNextPageSelector()
|
override fun latestUpdatesNextPageSelector(): String? = popularMangaNextPageSelector()
|
||||||
|
@ -57,7 +56,7 @@ class ReadM : ParsedHttpSource() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Search
|
// Search
|
||||||
|
|
||||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
||||||
val formBody = FormBody.Builder()
|
val formBody = FormBody.Builder()
|
||||||
|
@ -83,12 +82,11 @@ class ReadM : ParsedHttpSource() {
|
||||||
return POST("$baseUrl/service/advanced_search", searchHeaders, formBody.build())
|
return POST("$baseUrl/service/advanced_search", searchHeaders, formBody.build())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
override fun searchMangaNextPageSelector(): String? = null
|
override fun searchMangaNextPageSelector(): String? = null
|
||||||
override fun searchMangaSelector(): String = "div.poster-with-subject"
|
override fun searchMangaSelector(): String = "div.poster-with-subject"
|
||||||
override fun searchMangaFromElement(element: Element): SManga = popularMangaFromElement(element)
|
override fun searchMangaFromElement(element: Element): SManga = popularMangaFromElement(element)
|
||||||
|
|
||||||
//Details
|
// Details
|
||||||
|
|
||||||
override fun mangaDetailsParse(document: Document): SManga = SManga.create().apply {
|
override fun mangaDetailsParse(document: Document): SManga = SManga.create().apply {
|
||||||
thumbnail_url = document.select("img.series-profile-thumb").attr("abs:src")
|
thumbnail_url = document.select("img.series-profile-thumb").attr("abs:src")
|
||||||
|
@ -99,7 +97,7 @@ class ReadM : ParsedHttpSource() {
|
||||||
genre = document.select("div.series-summary-wrapper div.item a").joinToString(", ") { it.text().trim() }
|
genre = document.select("div.series-summary-wrapper div.item a").joinToString(", ") { it.text().trim() }
|
||||||
}
|
}
|
||||||
|
|
||||||
//Chapters
|
// Chapters
|
||||||
|
|
||||||
override fun chapterListSelector(): String = "div.season_start"
|
override fun chapterListSelector(): String = "div.season_start"
|
||||||
override fun chapterFromElement(element: Element): SChapter = SChapter.create().apply {
|
override fun chapterFromElement(element: Element): SChapter = SChapter.create().apply {
|
||||||
|
@ -142,14 +140,14 @@ class ReadM : ParsedHttpSource() {
|
||||||
return 0L
|
return 0L
|
||||||
}
|
}
|
||||||
|
|
||||||
//Pages
|
// Pages
|
||||||
|
|
||||||
override fun imageUrlParse(document: Document): String = throw Exception("Not Used")
|
override fun imageUrlParse(document: Document): String = throw Exception("Not Used")
|
||||||
override fun pageListParse(document: Document): List<Page> = document.select("div.ch-images img").mapIndexed { index, element ->
|
override fun pageListParse(document: Document): List<Page> = document.select("div.ch-images img").mapIndexed { index, element ->
|
||||||
Page(index, "", element.attr("abs:src"))
|
Page(index, "", element.attr("abs:src"))
|
||||||
}
|
}
|
||||||
|
|
||||||
//Filters
|
// Filters
|
||||||
|
|
||||||
override fun getFilterList(): FilterList = FilterList(
|
override fun getFilterList(): FilterList = FilterList(
|
||||||
TypeFilter(typeArray),
|
TypeFilter(typeArray),
|
||||||
|
@ -166,7 +164,6 @@ class ReadM : ParsedHttpSource() {
|
||||||
private class GenreFilter(state: List<Tag>) : Filter.Group<Tag>("Genres", state)
|
private class GenreFilter(state: List<Tag>) : Filter.Group<Tag>("Genres", state)
|
||||||
private class Tag(name: String, val id: String) : Filter.TriState(name)
|
private class Tag(name: String, val id: String) : Filter.TriState(name)
|
||||||
|
|
||||||
|
|
||||||
private val typeArray = arrayOf(
|
private val typeArray = arrayOf(
|
||||||
Pair("All", "all"),
|
Pair("All", "all"),
|
||||||
Pair("Japanese Manga", "japanese"),
|
Pair("Japanese Manga", "japanese"),
|
||||||
|
@ -221,6 +218,4 @@ class ReadM : ParsedHttpSource() {
|
||||||
Tag("Yaoi", "28"),
|
Tag("Yaoi", "28"),
|
||||||
Tag("Yuri", "20")
|
Tag("Yuri", "20")
|
||||||
).sortedWith(compareBy { it.name })
|
).sortedWith(compareBy { it.name })
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,14 +2,18 @@ package eu.kanade.tachiyomi.extension.en.readmangatoday
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.network.POST
|
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 eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
||||||
|
import java.util.Calendar
|
||||||
import okhttp3.Headers
|
import okhttp3.Headers
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
class Readmangatoday : ParsedHttpSource() {
|
class Readmangatoday : ParsedHttpSource() {
|
||||||
|
|
||||||
|
@ -165,7 +169,7 @@ class Readmangatoday : ParsedHttpSource() {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun pageListParse(document: Document): List<Page> {
|
override fun pageListParse(document: Document): List<Page> {
|
||||||
return document.select("div.content-list > img").mapIndexed{ i, img ->
|
return document.select("div.content-list > img").mapIndexed { i, img ->
|
||||||
Page(i, "", img.attr("abs:src"))
|
Page(i, "", img.attr("abs:src"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +1,23 @@
|
||||||
package eu.kanade.tachiyomi.extension.en.renascans
|
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.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.source.online.ParsedHttpSource
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.Locale
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
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() {
|
class Renascans : ParsedHttpSource() {
|
||||||
|
|
||||||
|
@ -143,8 +148,7 @@ class Renascans : ParsedHttpSource() {
|
||||||
return pages
|
return pages
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException("Not used")
|
override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException("Not used")
|
||||||
|
|
||||||
override fun getFilterList() = FilterList()
|
override fun getFilterList() = FilterList()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,19 @@
|
||||||
package eu.kanade.tachiyomi.extension.en.sleepypandascans
|
package eu.kanade.tachiyomi.extension.en.sleepypandascans
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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.source.online.ParsedHttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
import eu.kanade.tachiyomi.util.asJsoup
|
||||||
|
import java.util.Calendar
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.util.Calendar
|
|
||||||
|
|
||||||
class SleepyPandaScans : ParsedHttpSource() {
|
class SleepyPandaScans : ParsedHttpSource() {
|
||||||
|
|
||||||
|
@ -125,7 +129,7 @@ class SleepyPandaScans : ParsedHttpSource() {
|
||||||
val calendar = Calendar.getInstance()
|
val calendar = Calendar.getInstance()
|
||||||
|
|
||||||
if (date.contains("yesterday")) {
|
if (date.contains("yesterday")) {
|
||||||
calendar.apply{add(Calendar.DAY_OF_MONTH, -1)}
|
calendar.apply { add(Calendar.DAY_OF_MONTH, -1) }
|
||||||
} else {
|
} else {
|
||||||
val trimmedDate = date.replace("one", "1").removeSuffix("s").split(" ")
|
val trimmedDate = date.replace("one", "1").removeSuffix("s").split(" ")
|
||||||
|
|
||||||
|
@ -149,5 +153,4 @@ class SleepyPandaScans : ParsedHttpSource() {
|
||||||
override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException("Not used")
|
override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException("Not used")
|
||||||
|
|
||||||
override fun getFilterList() = FilterList()
|
override fun getFilterList() = FilterList()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package eu.kanade.tachiyomi.extension.en.tapastic
|
package eu.kanade.tachiyomi.extension.en.tapastic
|
||||||
|
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.util.Log
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.source.model.Filter
|
import eu.kanade.tachiyomi.source.model.Filter
|
||||||
import eu.kanade.tachiyomi.source.model.FilterList
|
import eu.kanade.tachiyomi.source.model.FilterList
|
||||||
|
@ -10,22 +9,22 @@ import eu.kanade.tachiyomi.source.model.SChapter
|
||||||
import eu.kanade.tachiyomi.source.model.SManga
|
import eu.kanade.tachiyomi.source.model.SManga
|
||||||
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
import eu.kanade.tachiyomi.util.asJsoup
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.Locale
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.Locale
|
|
||||||
|
|
||||||
class Tapastic : ParsedHttpSource() {
|
class Tapastic : ParsedHttpSource() {
|
||||||
|
|
||||||
//Info
|
// Info
|
||||||
override val lang = "en"
|
override val lang = "en"
|
||||||
override val supportsLatest = true
|
override val supportsLatest = true
|
||||||
override val name = "Tapastic"
|
override val name = "Tapastic"
|
||||||
override val baseUrl = "https://tapas.io"
|
override val baseUrl = "https://tapas.io"
|
||||||
|
|
||||||
//Popular
|
// Popular
|
||||||
|
|
||||||
override fun popularMangaRequest(page: Int): Request =
|
override fun popularMangaRequest(page: Int): Request =
|
||||||
GET("$baseUrl/comics?b=POPULAR&g=&f=NONE&pageNumber=$page&pageSize=20&")
|
GET("$baseUrl/comics?b=POPULAR&g=&f=NONE&pageNumber=$page&pageSize=20&")
|
||||||
|
@ -38,7 +37,7 @@ class Tapastic : ParsedHttpSource() {
|
||||||
thumbnail_url = element.select(".item__thumb img").attr("src")
|
thumbnail_url = element.select(".item__thumb img").attr("src")
|
||||||
}
|
}
|
||||||
|
|
||||||
//Latest
|
// Latest
|
||||||
|
|
||||||
override fun latestUpdatesRequest(page: Int): Request =
|
override fun latestUpdatesRequest(page: Int): Request =
|
||||||
GET("$baseUrl/comics?b=FRESH&g=&f=NONE&pageNumber=$page&pageSize=20&")
|
GET("$baseUrl/comics?b=FRESH&g=&f=NONE&pageNumber=$page&pageSize=20&")
|
||||||
|
@ -48,10 +47,10 @@ class Tapastic : ParsedHttpSource() {
|
||||||
override fun latestUpdatesFromElement(element: Element): SManga =
|
override fun latestUpdatesFromElement(element: Element): SManga =
|
||||||
popularMangaFromElement(element)
|
popularMangaFromElement(element)
|
||||||
|
|
||||||
//Search
|
// Search
|
||||||
|
|
||||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
||||||
//If there is any search text, use text search, otherwise use filter search
|
// If there is any search text, use text search, otherwise use filter search
|
||||||
val uri = if (query.isNotBlank()) {
|
val uri = if (query.isNotBlank()) {
|
||||||
Uri.parse("$baseUrl/search")
|
Uri.parse("$baseUrl/search")
|
||||||
.buildUpon()
|
.buildUpon()
|
||||||
|
@ -59,14 +58,14 @@ class Tapastic : ParsedHttpSource() {
|
||||||
.appendQueryParameter("q", query)
|
.appendQueryParameter("q", query)
|
||||||
} else {
|
} else {
|
||||||
val uri = Uri.parse("$baseUrl/comics").buildUpon()
|
val uri = Uri.parse("$baseUrl/comics").buildUpon()
|
||||||
//Append uri filters
|
// Append uri filters
|
||||||
filters.forEach {
|
filters.forEach {
|
||||||
if (it is UriFilter)
|
if (it is UriFilter)
|
||||||
it.addToUri(uri)
|
it.addToUri(uri)
|
||||||
}
|
}
|
||||||
uri
|
uri
|
||||||
}
|
}
|
||||||
//Append page number
|
// Append page number
|
||||||
uri.appendQueryParameter("pageNumber", page.toString())
|
uri.appendQueryParameter("pageNumber", page.toString())
|
||||||
return GET(uri.toString())
|
return GET(uri.toString())
|
||||||
}
|
}
|
||||||
|
@ -86,7 +85,7 @@ class Tapastic : ParsedHttpSource() {
|
||||||
thumbnail_url = element.select(".item__thumb img, .thumb-wrap img").attr("src")
|
thumbnail_url = element.select(".item__thumb img, .thumb-wrap img").attr("src")
|
||||||
}
|
}
|
||||||
|
|
||||||
//Details
|
// Details
|
||||||
|
|
||||||
override fun mangaDetailsParse(document: Document) = SManga.create().apply {
|
override fun mangaDetailsParse(document: Document) = SManga.create().apply {
|
||||||
title = document.select(".desc__title").text().trim()
|
title = document.select(".desc__title").text().trim()
|
||||||
|
@ -98,7 +97,7 @@ class Tapastic : ParsedHttpSource() {
|
||||||
thumbnail_url = document.select("div.header__thumb img").attr("src")
|
thumbnail_url = document.select("div.header__thumb img").attr("src")
|
||||||
}
|
}
|
||||||
|
|
||||||
//Chapters
|
// Chapters
|
||||||
|
|
||||||
override fun chapterListRequest(manga: SManga): Request {
|
override fun chapterListRequest(manga: SManga): Request {
|
||||||
return GET(baseUrl + manga.url + "?sort_order=desc", headers)
|
return GET(baseUrl + manga.url + "?sort_order=desc", headers)
|
||||||
|
@ -144,7 +143,7 @@ class Tapastic : ParsedHttpSource() {
|
||||||
return SimpleDateFormat("MMM dd, yyyy", Locale.US).parse(date)?.time ?: 0
|
return SimpleDateFormat("MMM dd, yyyy", Locale.US).parse(date)?.time ?: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
//Pages
|
// Pages
|
||||||
|
|
||||||
override fun pageListRequest(chapter: SChapter): Request {
|
override fun pageListRequest(chapter: SChapter): Request {
|
||||||
if (chapter.url == "locked") throw Exception("Chapter Locked. If logged in, refresh chapter list.")
|
if (chapter.url == "locked") throw Exception("Chapter Locked. If logged in, refresh chapter list.")
|
||||||
|
@ -160,10 +159,10 @@ class Tapastic : ParsedHttpSource() {
|
||||||
override fun imageUrlParse(document: Document) =
|
override fun imageUrlParse(document: Document) =
|
||||||
throw UnsupportedOperationException("This method should not be called!")
|
throw UnsupportedOperationException("This method should not be called!")
|
||||||
|
|
||||||
//Filters
|
// Filters
|
||||||
|
|
||||||
override fun getFilterList() = FilterList(
|
override fun getFilterList() = FilterList(
|
||||||
//Tapastic does not support genre filtering and text search at the same time
|
// Tapastic does not support genre filtering and text search at the same time
|
||||||
Filter.Header("NOTE: Ignored if using text search!"),
|
Filter.Header("NOTE: Ignored if using text search!"),
|
||||||
Filter.Separator(),
|
Filter.Separator(),
|
||||||
FilterFilter(),
|
FilterFilter(),
|
||||||
|
@ -225,9 +224,11 @@ class Tapastic : ParsedHttpSource() {
|
||||||
* If an entry is selected it is appended as a query parameter onto the end of the URI.
|
* If an entry is selected it is appended as a query parameter onto the end of the URI.
|
||||||
* If `firstIsUnspecified` is set to true, if the first entry is selected, nothing will be appended on the the URI.
|
* If `firstIsUnspecified` is set to true, if the first entry is selected, nothing will be appended on the the URI.
|
||||||
*/
|
*/
|
||||||
//vals: <name, display>
|
// vals: <name, display>
|
||||||
private open class UriSelectFilter(
|
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,
|
val firstIsUnspecified: Boolean = true,
|
||||||
defaultValue: Int = 0
|
defaultValue: Int = 0
|
||||||
) :
|
) :
|
||||||
|
|
|
@ -5,13 +5,18 @@ import com.github.salomonbrys.kotson.get
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
||||||
import com.google.gson.JsonObject
|
import com.google.gson.JsonObject
|
||||||
import eu.kanade.tachiyomi.extension.en.tsumino.TsuminoUtils.Companion.getArtists
|
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.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.extension.en.tsumino.TsuminoUtils.Companion.getDesc
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.network.POST
|
import eu.kanade.tachiyomi.network.POST
|
||||||
import eu.kanade.tachiyomi.network.asObservableSuccess
|
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.source.online.ParsedHttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
import eu.kanade.tachiyomi.util.asJsoup
|
||||||
import okhttp3.FormBody
|
import okhttp3.FormBody
|
||||||
|
@ -22,7 +27,7 @@ import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import rx.Observable
|
import rx.Observable
|
||||||
|
|
||||||
class Tsumino: ParsedHttpSource() {
|
class Tsumino : ParsedHttpSource() {
|
||||||
|
|
||||||
override val name = "Tsumino"
|
override val name = "Tsumino"
|
||||||
|
|
||||||
|
@ -59,7 +64,7 @@ class Tsumino: ParsedHttpSource() {
|
||||||
return MangasPage(allManga, hasNextPage)
|
return MangasPage(allManga, hasNextPage)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun latestUpdatesFromElement(element: Element): SManga = throw UnsupportedOperationException("Not used")
|
override fun latestUpdatesFromElement(element: Element): SManga = throw UnsupportedOperationException("Not used")
|
||||||
|
|
||||||
override fun latestUpdatesNextPageSelector() = "Not needed"
|
override fun latestUpdatesNextPageSelector() = "Not needed"
|
||||||
|
|
||||||
|
@ -96,7 +101,7 @@ class Tsumino: ParsedHttpSource() {
|
||||||
add("Tags[$index][Exclude]", entry.exclude.toString())
|
add("Tags[$index][Exclude]", entry.exclude.toString())
|
||||||
}
|
}
|
||||||
|
|
||||||
if(f.filterIsInstance<ExcludeParodiesFilter>().first().state)
|
if (f.filterIsInstance<ExcludeParodiesFilter>().first().state)
|
||||||
add("Exclude[]", "6")
|
add("Exclude[]", "6")
|
||||||
}
|
}
|
||||||
.build()
|
.build()
|
||||||
|
@ -190,12 +195,12 @@ class Tsumino: ParsedHttpSource() {
|
||||||
pages.add(Page(i, "", data))
|
pages.add(Page(i, "", data))
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw UnsupportedOperationException("Error: Open in WebView and solve the Captcha!")
|
throw UnsupportedOperationException("Error: Open in WebView and solve the Captcha!")
|
||||||
}
|
}
|
||||||
return pages
|
return pages
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException("Not used")
|
override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException("Not used")
|
||||||
|
|
||||||
data class AdvSearchEntry(val type: Int, val text: String, val exclude: Boolean)
|
data class AdvSearchEntry(val type: Int, val text: String, val exclude: Boolean)
|
||||||
|
|
||||||
|
@ -231,7 +236,7 @@ class Tsumino: ParsedHttpSource() {
|
||||||
|
|
||||||
class SortFilter : Filter.Select<SortType>("Sort by", SortType.values())
|
class SortFilter : Filter.Select<SortType>("Sort by", SortType.values())
|
||||||
class LengthFilter : Filter.Select<LengthType>("Length", LengthType.values())
|
class LengthFilter : Filter.Select<LengthType>("Length", LengthType.values())
|
||||||
class MinimumRatingFilter : Filter.Select<String>("Minimum rating", (0 .. 5).map { "$it stars" }.toTypedArray())
|
class MinimumRatingFilter : Filter.Select<String>("Minimum rating", (0..5).map { "$it stars" }.toTypedArray())
|
||||||
class ExcludeParodiesFilter : Filter.CheckBox("Exclude parodies")
|
class ExcludeParodiesFilter : Filter.CheckBox("Exclude parodies")
|
||||||
|
|
||||||
enum class SortType {
|
enum class SortType {
|
||||||
|
|
|
@ -100,8 +100,8 @@ class TsuminoUtils {
|
||||||
name = "Chapter"
|
name = "Chapter"
|
||||||
scanlator = getGroups(document)
|
scanlator = getGroups(document)
|
||||||
chapter_number = 1f
|
chapter_number = 1f
|
||||||
url = response.request().url().encodedPath().
|
url = response.request().url().encodedPath()
|
||||||
replace("entry", "Read/Index")
|
.replace("entry", "Read/Index")
|
||||||
}
|
}
|
||||||
chapterList.add(chapter)
|
chapterList.add(chapter)
|
||||||
return chapterList
|
return chapterList
|
||||||
|
|
|
@ -4,7 +4,11 @@ import android.os.Build.VERSION
|
||||||
import eu.kanade.tachiyomi.extension.BuildConfig
|
import eu.kanade.tachiyomi.extension.BuildConfig
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.network.asObservableSuccess
|
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.source.online.ParsedHttpSource
|
||||||
import okhttp3.Headers
|
import okhttp3.Headers
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
|
|
|
@ -1,7 +1,12 @@
|
||||||
package eu.kanade.tachiyomi.extension.en.webcomics
|
package eu.kanade.tachiyomi.extension.en.webcomics
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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.source.online.ParsedHttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
import eu.kanade.tachiyomi.util.asJsoup
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
@ -9,7 +14,6 @@ import okhttp3.Request
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.lang.UnsupportedOperationException
|
|
||||||
|
|
||||||
class Webcomics : ParsedHttpSource() {
|
class Webcomics : ParsedHttpSource() {
|
||||||
|
|
||||||
|
|
|
@ -5,13 +5,17 @@ import com.github.salomonbrys.kotson.get
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
||||||
import com.google.gson.JsonObject
|
import com.google.gson.JsonObject
|
||||||
import eu.kanade.tachiyomi.network.POST
|
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.source.online.HttpSource
|
||||||
import okhttp3.OkHttpClient
|
|
||||||
import okhttp3.Headers
|
import okhttp3.Headers
|
||||||
|
import okhttp3.OkHttpClient
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import okhttp3.Response
|
|
||||||
import okhttp3.RequestBody
|
import okhttp3.RequestBody
|
||||||
|
import okhttp3.Response
|
||||||
|
|
||||||
class Wutopia : HttpSource() {
|
class Wutopia : HttpSource() {
|
||||||
|
|
||||||
|
@ -129,5 +133,4 @@ class Wutopia : HttpSource() {
|
||||||
override fun imageUrlParse(response: Response): String = throw UnsupportedOperationException("Not used")
|
override fun imageUrlParse(response: Response): String = throw UnsupportedOperationException("Not used")
|
||||||
|
|
||||||
override fun getFilterList() = FilterList()
|
override fun getFilterList() = FilterList()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +1,18 @@
|
||||||
package eu.kanade.tachiyomi.extension.en.xkcd
|
package eu.kanade.tachiyomi.extension.en.xkcd
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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.source.online.ParsedHttpSource
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.Locale
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import rx.Observable
|
import rx.Observable
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.Locale
|
|
||||||
|
|
||||||
class Xkcd : ParsedHttpSource() {
|
class Xkcd : ParsedHttpSource() {
|
||||||
|
|
||||||
|
@ -57,7 +61,7 @@ class Xkcd : ParsedHttpSource() {
|
||||||
|
|
||||||
// transforming filename from info.0.json isn't guaranteed to work, stick to html
|
// transforming filename from info.0.json isn't guaranteed to work, stick to html
|
||||||
// if an HD image is available it'll be the srcset attribute
|
// if an HD image is available it'll be the srcset attribute
|
||||||
val image = document.select("div#comic img").let {
|
val image = document.select("div#comic img").let {
|
||||||
if (it.hasAttr("srcset")) it.attr("abs:srcset").substringBefore(" ")
|
if (it.hasAttr("srcset")) it.attr("abs:srcset").substringBefore(" ")
|
||||||
else it.attr("abs:src")
|
else it.attr("abs:src")
|
||||||
}
|
}
|
||||||
|
@ -129,5 +133,4 @@ class Xkcd : ParsedHttpSource() {
|
||||||
const val baseAltTextUrl = "https://fakeimg.pl/1500x2126/ffffff/000000/?text="
|
const val baseAltTextUrl = "https://fakeimg.pl/1500x2126/ffffff/000000/?text="
|
||||||
const val baseAltTextPostUrl = "&font_size=42&font=museo"
|
const val baseAltTextPostUrl = "&font_size=42&font=museo"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,13 +11,13 @@ import eu.kanade.tachiyomi.source.model.SChapter
|
||||||
import eu.kanade.tachiyomi.source.model.SManga
|
import eu.kanade.tachiyomi.source.model.SManga
|
||||||
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
import eu.kanade.tachiyomi.util.asJsoup
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.Locale
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import okhttp3.RequestBody
|
import okhttp3.RequestBody
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.Locale
|
|
||||||
|
|
||||||
open class DoujinYang : ParsedHttpSource() {
|
open class DoujinYang : ParsedHttpSource() {
|
||||||
|
|
||||||
|
@ -35,7 +35,6 @@ open class DoujinYang : ParsedHttpSource() {
|
||||||
override fun latestUpdatesNextPageSelector() = "nav#paginacion a:contains(Última)"
|
override fun latestUpdatesNextPageSelector() = "nav#paginacion a:contains(Última)"
|
||||||
override fun searchMangaNextPageSelector() = latestUpdatesNextPageSelector()
|
override fun searchMangaNextPageSelector() = latestUpdatesNextPageSelector()
|
||||||
|
|
||||||
|
|
||||||
override fun popularMangaRequest(page: Int) =
|
override fun popularMangaRequest(page: Int) =
|
||||||
GET("$baseUrl/directorio/?orden=visitas&p=$page", headers)
|
GET("$baseUrl/directorio/?orden=visitas&p=$page", headers)
|
||||||
|
|
||||||
|
@ -46,7 +45,7 @@ open class DoujinYang : ParsedHttpSource() {
|
||||||
.appendQueryParameter("s", query)
|
.appendQueryParameter("s", query)
|
||||||
} else {
|
} else {
|
||||||
val uri = Uri.parse("$baseUrl/directorio").buildUpon()
|
val uri = Uri.parse("$baseUrl/directorio").buildUpon()
|
||||||
//Append uri filters
|
// Append uri filters
|
||||||
filters.forEach {
|
filters.forEach {
|
||||||
if (it is UriFilter)
|
if (it is UriFilter)
|
||||||
it.addToUri(uri)
|
it.addToUri(uri)
|
||||||
|
@ -56,8 +55,8 @@ open class DoujinYang : ParsedHttpSource() {
|
||||||
return GET(uri.toString(), headers)
|
return GET(uri.toString(), headers)
|
||||||
}
|
}
|
||||||
|
|
||||||
//override fun mangaDetailsRequest(manga: SManga) = GET(baseUrl + manga.url, headers)
|
// override fun mangaDetailsRequest(manga: SManga) = GET(baseUrl + manga.url, headers)
|
||||||
//override fun pageListRequest(chapter: SChapter) = GET(baseUrl + chapter.url, headers)
|
// override fun pageListRequest(chapter: SChapter) = GET(baseUrl + chapter.url, headers)
|
||||||
|
|
||||||
override fun chapterListRequest(manga: SManga): Request {
|
override fun chapterListRequest(manga: SManga): Request {
|
||||||
return GET(baseUrl + manga.url, headers)
|
return GET(baseUrl + manga.url, headers)
|
||||||
|
@ -88,12 +87,11 @@ open class DoujinYang : ParsedHttpSource() {
|
||||||
val manga = SManga.create()
|
val manga = SManga.create()
|
||||||
manga.setUrlWithoutDomain(element.select("a").first().attr("abs:href"))
|
manga.setUrlWithoutDomain(element.select("a").first().attr("abs:href"))
|
||||||
manga.title = element.select("h2").text().trim()
|
manga.title = element.select("h2").text().trim()
|
||||||
//manga.thumbnail_url = "https:" + element.select("img").attr("src")
|
// manga.thumbnail_url = "https:" + element.select("img").attr("src")
|
||||||
manga.thumbnail_url = element.select("img").attr("abs:src")
|
manga.thumbnail_url = element.select("img").attr("abs:src")
|
||||||
return manga
|
return manga
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
override fun chapterListParse(response: Response): List<SChapter> {
|
override fun chapterListParse(response: Response): List<SChapter> {
|
||||||
return response.asJsoup().select("div#c_list a").map { element ->
|
return response.asJsoup().select("div#c_list a").map { element ->
|
||||||
SChapter.create().apply {
|
SChapter.create().apply {
|
||||||
|
@ -123,7 +121,7 @@ open class DoujinYang : ParsedHttpSource() {
|
||||||
manga.genre = glist.joinToString(", ")
|
manga.genre = glist.joinToString(", ")
|
||||||
manga.status = when (document.select("span[id=desarrollo]")?.first()?.text()) {
|
manga.status = when (document.select("span[id=desarrollo]")?.first()?.text()) {
|
||||||
"En desarrollo" -> SManga.ONGOING
|
"En desarrollo" -> SManga.ONGOING
|
||||||
//"Completed" -> SManga.COMPLETED
|
// "Completed" -> SManga.COMPLETED
|
||||||
else -> SManga.UNKNOWN
|
else -> SManga.UNKNOWN
|
||||||
}
|
}
|
||||||
return manga
|
return manga
|
||||||
|
@ -296,7 +294,7 @@ open class DoujinYang : ParsedHttpSource() {
|
||||||
* If an entry is selected it is appended as a query parameter onto the end of the URI.
|
* If an entry is selected it is appended as a query parameter onto the end of the URI.
|
||||||
* If `firstIsUnspecified` is set to true, if the first entry is selected, nothing will be appended on the the URI.
|
* If `firstIsUnspecified` is set to true, if the first entry is selected, nothing will be appended on the the URI.
|
||||||
*/
|
*/
|
||||||
//vals: <name, display>
|
// vals: <name, display>
|
||||||
open class UriPartFilter(
|
open class UriPartFilter(
|
||||||
displayName: String,
|
displayName: String,
|
||||||
private val uriParam: String,
|
private val uriParam: String,
|
||||||
|
@ -330,4 +328,3 @@ open class DoujinYang : ParsedHttpSource() {
|
||||||
fun addToUri(uri: Uri.Builder)
|
fun addToUri(uri: Uri.Builder)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,25 @@
|
||||||
package eu.kanade.tachiyomi.extension.es.heavenmanga
|
package eu.kanade.tachiyomi.extension.es.heavenmanga
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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.source.online.ParsedHttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
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 okhttp3.Response
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
|
import org.jsoup.select.Elements
|
||||||
|
import rx.Observable
|
||||||
|
|
||||||
class HeavenManga : ParsedHttpSource() {
|
class HeavenManga : ParsedHttpSource() {
|
||||||
|
|
||||||
|
@ -55,28 +67,27 @@ class HeavenManga : ParsedHttpSource() {
|
||||||
val ext = ".html"
|
val ext = ".html"
|
||||||
var name: String
|
var name: String
|
||||||
filters.forEach { filter ->
|
filters.forEach { filter ->
|
||||||
when(filter) {
|
when (filter) {
|
||||||
is GenreFilter -> {
|
is GenreFilter -> {
|
||||||
if(filter.toUriPart().isNotBlank() && filter.state != 0) {
|
if (filter.toUriPart().isNotBlank() && filter.state != 0) {
|
||||||
name = filter.toUriPart()
|
name = filter.toUriPart()
|
||||||
return GET("$baseUrl/genero/$name$ext$pageParameter", headers)
|
return GET("$baseUrl/genero/$name$ext$pageParameter", headers)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
is AlphabeticoFilter -> {
|
is AlphabeticoFilter -> {
|
||||||
if(filter.toUriPart().isNotBlank() && filter.state != 0) {
|
if (filter.toUriPart().isNotBlank() && filter.state != 0) {
|
||||||
name = filter.toUriPart()
|
name = filter.toUriPart()
|
||||||
return GET("$baseUrl/letra/$name$ext$pageParameter", headers)
|
return GET("$baseUrl/letra/$name$ext$pageParameter", headers)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
is ListaCompletasFilter -> {
|
is ListaCompletasFilter -> {
|
||||||
if(filter.toUriPart().isNotBlank() && filter.state != 0) {
|
if (filter.toUriPart().isNotBlank() && filter.state != 0) {
|
||||||
name = filter.toUriPart()
|
name = filter.toUriPart()
|
||||||
return GET("$baseUrl/$name$pageParameter", headers)
|
return GET("$baseUrl/$name$pageParameter", headers)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return GET(searchUrl, headers)
|
return GET(searchUrl, headers)
|
||||||
|
@ -123,6 +134,7 @@ class HeavenManga : ParsedHttpSource() {
|
||||||
setUrlWithoutDomain(it.attr("href"))
|
setUrlWithoutDomain(it.attr("href"))
|
||||||
}
|
}
|
||||||
scanlator = element.select("span.pull-right").text()
|
scanlator = element.select("span.pull-right").text()
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -277,7 +289,7 @@ class HeavenManga : ParsedHttpSource() {
|
||||||
* Array.from(document.querySelectorAll('#t li a')).map(a => `Pair("${a.textContent}", "${a.getAttribute('href')}")`).join(',\n')
|
* Array.from(document.querySelectorAll('#t li a')).map(a => `Pair("${a.textContent}", "${a.getAttribute('href')}")`).join(',\n')
|
||||||
* on https://heavenmanga.com/top/
|
* on https://heavenmanga.com/top/
|
||||||
* */
|
* */
|
||||||
private class ListaCompletasFilter: UriPartFilter("Lista Completa", arrayOf(
|
private class ListaCompletasFilter : UriPartFilter("Lista Completa", arrayOf(
|
||||||
Pair("Todo", ""),
|
Pair("Todo", ""),
|
||||||
Pair("Lista Comis", "comic"),
|
Pair("Lista Comis", "comic"),
|
||||||
Pair("Lista Novelas", "novela"),
|
Pair("Lista Novelas", "novela"),
|
||||||
|
@ -294,10 +306,8 @@ class HeavenManga : ParsedHttpSource() {
|
||||||
ListaCompletasFilter()
|
ListaCompletasFilter()
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
private open class UriPartFilter(displayName: String, val vals: Array<Pair<String, String>>) :
|
private open class UriPartFilter(displayName: String, val vals: Array<Pair<String, String>>) :
|
||||||
Filter.Select<String>(displayName, vals.map { it.first }.toTypedArray()) {
|
Filter.Select<String>(displayName, vals.map { it.first }.toTypedArray()) {
|
||||||
fun toUriPart() = vals[state].second
|
fun toUriPart() = vals[state].second
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,19 +29,19 @@ class Ikuhentai : ParsedHttpSource() {
|
||||||
}
|
}
|
||||||
// LIST SELECTOR
|
// LIST SELECTOR
|
||||||
override fun popularMangaSelector() = "div.c-tabs-item__content"
|
override fun popularMangaSelector() = "div.c-tabs-item__content"
|
||||||
override fun latestUpdatesSelector() = popularMangaSelector()
|
override fun latestUpdatesSelector() = popularMangaSelector()
|
||||||
override fun searchMangaSelector() = popularMangaSelector()
|
override fun searchMangaSelector() = popularMangaSelector()
|
||||||
|
|
||||||
// ELEMENT
|
// ELEMENT
|
||||||
override fun popularMangaFromElement(element: Element): SManga = searchMangaFromElement(element)
|
override fun popularMangaFromElement(element: Element): SManga = searchMangaFromElement(element)
|
||||||
override fun latestUpdatesFromElement(element: Element): SManga = searchMangaFromElement(element)
|
override fun latestUpdatesFromElement(element: Element): SManga = searchMangaFromElement(element)
|
||||||
|
|
||||||
// NEXT SELECTOR
|
// NEXT SELECTOR
|
||||||
override fun popularMangaNextPageSelector() = "a.nextpostslink"
|
override fun popularMangaNextPageSelector() = "a.nextpostslink"
|
||||||
override fun latestUpdatesNextPageSelector() = popularMangaNextPageSelector()
|
override fun latestUpdatesNextPageSelector() = popularMangaNextPageSelector()
|
||||||
override fun searchMangaNextPageSelector() = popularMangaNextPageSelector()
|
override fun searchMangaNextPageSelector() = popularMangaNextPageSelector()
|
||||||
|
|
||||||
override fun searchMangaFromElement(element: Element):SManga {
|
override fun searchMangaFromElement(element: Element): SManga {
|
||||||
val manga = SManga.create()
|
val manga = SManga.create()
|
||||||
manga.thumbnail_url = element.select("div.col-4.col-sm-2.col-md-2 > div > a > img").attr("data-src")
|
manga.thumbnail_url = element.select("div.col-4.col-sm-2.col-md-2 > div > a > img").attr("data-src")
|
||||||
element.select("div.tab-thumb > a").first().let {
|
element.select("div.tab-thumb > a").first().let {
|
||||||
|
@ -53,16 +53,16 @@ class Ikuhentai : ParsedHttpSource() {
|
||||||
|
|
||||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
||||||
val url = HttpUrl.parse("$baseUrl/page/$page")!!.newBuilder()
|
val url = HttpUrl.parse("$baseUrl/page/$page")!!.newBuilder()
|
||||||
url.addQueryParameter("post_type","wp-manga")
|
url.addQueryParameter("post_type", "wp-manga")
|
||||||
val pattern = "\\s+".toRegex()
|
val pattern = "\\s+".toRegex()
|
||||||
val q = query.replace(pattern, "+")
|
val q = query.replace(pattern, "+")
|
||||||
if(query.length > 0){
|
if (query.length > 0) {
|
||||||
url.addQueryParameter("s", q)
|
url.addQueryParameter("s", q)
|
||||||
}else{
|
} else {
|
||||||
url.addQueryParameter("s", "")
|
url.addQueryParameter("s", "")
|
||||||
}
|
}
|
||||||
|
|
||||||
var orderBy = ""
|
var orderBy: String
|
||||||
|
|
||||||
(if (filters.isEmpty()) getFilterList() else filters).forEach { filter ->
|
(if (filters.isEmpty()) getFilterList() else filters).forEach { filter ->
|
||||||
when (filter) {
|
when (filter) {
|
||||||
|
@ -74,29 +74,29 @@ class Ikuhentai : ParsedHttpSource() {
|
||||||
genreInclude.add(it.id)
|
genreInclude.add(it.id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(genreInclude.isNotEmpty()){
|
if (genreInclude.isNotEmpty()) {
|
||||||
genreInclude.forEach{ genre ->
|
genreInclude.forEach { genre ->
|
||||||
url.addQueryParameter("genre[]", genre)
|
url.addQueryParameter("genre[]", genre)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
is StatusList ->{
|
is StatusList -> {
|
||||||
val statuses = mutableListOf<String>()
|
val statuses = mutableListOf<String>()
|
||||||
filter.state.forEach {
|
filter.state.forEach {
|
||||||
if (it.state == 1) {
|
if (it.state == 1) {
|
||||||
statuses.add(it.id)
|
statuses.add(it.id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(statuses.isNotEmpty()){
|
if (statuses.isNotEmpty()) {
|
||||||
statuses.forEach{ status ->
|
statuses.forEach { status ->
|
||||||
url.addQueryParameter("status[]", status)
|
url.addQueryParameter("status[]", status)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
is SortBy -> {
|
is SortBy -> {
|
||||||
orderBy = filter.toUriPart();
|
orderBy = filter.toUriPart()
|
||||||
url.addQueryParameter("m_orderby",orderBy)
|
url.addQueryParameter("m_orderby", orderBy)
|
||||||
}
|
}
|
||||||
is TextField -> url.addQueryParameter(filter.key, filter.state)
|
is TextField -> url.addQueryParameter(filter.key, filter.state)
|
||||||
}
|
}
|
||||||
|
@ -105,8 +105,6 @@ class Ikuhentai : ParsedHttpSource() {
|
||||||
return GET(url.toString(), headers)
|
return GET(url.toString(), headers)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// max 200 results
|
// max 200 results
|
||||||
|
|
||||||
override fun mangaDetailsParse(document: Document): SManga {
|
override fun mangaDetailsParse(document: Document): SManga {
|
||||||
|
@ -121,7 +119,7 @@ class Ikuhentai : ParsedHttpSource() {
|
||||||
val genre = element.text()
|
val genre = element.text()
|
||||||
genres.add(genre)
|
genres.add(genre)
|
||||||
}
|
}
|
||||||
manga.genre =genres.joinToString(", ")
|
manga.genre = genres.joinToString(", ")
|
||||||
manga.status = parseStatus(infoElement.select("div.post-status > div:nth-child(2) > div.summary-content").text())
|
manga.status = parseStatus(infoElement.select("div.post-status > div:nth-child(2) > div.summary-content").text())
|
||||||
|
|
||||||
manga.description = document.select("div.description-summary")?.text()
|
manga.description = document.select("div.description-summary")?.text()
|
||||||
|
@ -142,7 +140,7 @@ class Ikuhentai : ParsedHttpSource() {
|
||||||
override fun chapterFromElement(element: Element): SChapter {
|
override fun chapterFromElement(element: Element): SChapter {
|
||||||
val urlElement = element.select("a").first()
|
val urlElement = element.select("a").first()
|
||||||
var url = urlElement.attr("href")
|
var url = urlElement.attr("href")
|
||||||
url = url.replace("/p/1","")
|
url = url.replace("/p/1", "")
|
||||||
url += "?style=list"
|
url += "?style=list"
|
||||||
val chapter = SChapter.create()
|
val chapter = SChapter.create()
|
||||||
chapter.setUrlWithoutDomain(url)
|
chapter.setUrlWithoutDomain(url)
|
||||||
|
@ -168,7 +166,7 @@ class Ikuhentai : ParsedHttpSource() {
|
||||||
document.select("div.reading-content * img").forEach { element ->
|
document.select("div.reading-content * img").forEach { element ->
|
||||||
val url = element.attr("data-src")
|
val url = element.attr("data-src")
|
||||||
i++
|
i++
|
||||||
if(url.length != 0){
|
if (url.length != 0) {
|
||||||
pages.add(Page(i, "", url))
|
pages.add(Page(i, "", url))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -210,59 +208,58 @@ class Ikuhentai : ParsedHttpSource() {
|
||||||
GenreList(getGenreList())
|
GenreList(getGenreList())
|
||||||
)
|
)
|
||||||
private fun getStatusList() = listOf(
|
private fun getStatusList() = listOf(
|
||||||
Status("Completado","end"),
|
Status("Completado", "end"),
|
||||||
Status("En emisión","on-going"),
|
Status("En emisión", "on-going"),
|
||||||
Status("Cancelado","canceled"),
|
Status("Cancelado", "canceled"),
|
||||||
Status("Pausado","on-hold")
|
Status("Pausado", "on-hold")
|
||||||
)
|
)
|
||||||
private fun getGenreList() = listOf(
|
private fun getGenreList() = listOf(
|
||||||
Genre("Ahegao","ahegao"),
|
Genre("Ahegao", "ahegao"),
|
||||||
Genre("Anal","anal"),
|
Genre("Anal", "anal"),
|
||||||
Genre("Bestiality","bestialidad"),
|
Genre("Bestiality", "bestialidad"),
|
||||||
Genre("Bondage","bondage"),
|
Genre("Bondage", "bondage"),
|
||||||
Genre("Bukkake","bukkake"),
|
Genre("Bukkake", "bukkake"),
|
||||||
Genre("Chicas monstruo","chicas-monstruo"),
|
Genre("Chicas monstruo", "chicas-monstruo"),
|
||||||
Genre("Chikan","chikan"),
|
Genre("Chikan", "chikan"),
|
||||||
Genre("Colegialas","colegialas"),
|
Genre("Colegialas", "colegialas"),
|
||||||
Genre("Comics porno","comics-porno"),
|
Genre("Comics porno", "comics-porno"),
|
||||||
Genre("Dark Skin","dark-skin"),
|
Genre("Dark Skin", "dark-skin"),
|
||||||
Genre("Demonios","demonios"),
|
Genre("Demonios", "demonios"),
|
||||||
Genre("Ecchi","ecchi"),
|
Genre("Ecchi", "ecchi"),
|
||||||
Genre("Embarazadas","embarazadas"),
|
Genre("Embarazadas", "embarazadas"),
|
||||||
Genre("Enfermeras","enfermeras"),
|
Genre("Enfermeras", "enfermeras"),
|
||||||
Genre("Eroges","eroges"),
|
Genre("Eroges", "eroges"),
|
||||||
Genre("Fantasía","fantasia"),
|
Genre("Fantasía", "fantasia"),
|
||||||
Genre("Futanari","futanari"),
|
Genre("Futanari", "futanari"),
|
||||||
Genre("Gangbang","gangbang"),
|
Genre("Gangbang", "gangbang"),
|
||||||
Genre("Gemelas","gemelas"),
|
Genre("Gemelas", "gemelas"),
|
||||||
Genre("Gender Bender","gender-bender"),
|
Genre("Gender Bender", "gender-bender"),
|
||||||
Genre("Gore","gore"),
|
Genre("Gore", "gore"),
|
||||||
Genre("Handjob","handjob"),
|
Genre("Handjob", "handjob"),
|
||||||
Genre("Harem","harem"),
|
Genre("Harem", "harem"),
|
||||||
Genre("Hipnosis","hipnosis"),
|
Genre("Hipnosis", "hipnosis"),
|
||||||
Genre("Incesto","incesto"),
|
Genre("Incesto", "incesto"),
|
||||||
Genre("Loli","loli"),
|
Genre("Loli", "loli"),
|
||||||
Genre("Maids","maids"),
|
Genre("Maids", "maids"),
|
||||||
Genre("Masturbación","masturbacion"),
|
Genre("Masturbación", "masturbacion"),
|
||||||
Genre("Milf","milf"),
|
Genre("Milf", "milf"),
|
||||||
Genre("Mind Break","mind-break"),
|
Genre("Mind Break", "mind-break"),
|
||||||
Genre("My Hero Academia","my-hero-academia"),
|
Genre("My Hero Academia", "my-hero-academia"),
|
||||||
Genre("Naruto","naruto"),
|
Genre("Naruto", "naruto"),
|
||||||
Genre("Netorare","netorare"),
|
Genre("Netorare", "netorare"),
|
||||||
Genre("Paizuri","paizuri"),
|
Genre("Paizuri", "paizuri"),
|
||||||
Genre("Pokemon","pokemon"),
|
Genre("Pokemon", "pokemon"),
|
||||||
Genre("Profesora","profesora"),
|
Genre("Profesora", "profesora"),
|
||||||
Genre("Prostitución","prostitucion"),
|
Genre("Prostitución", "prostitucion"),
|
||||||
Genre("Romance","romance"),
|
Genre("Romance", "romance"),
|
||||||
Genre("Straight Shota","straight-shota"),
|
Genre("Straight Shota", "straight-shota"),
|
||||||
Genre("Tentáculos","tentaculos"),
|
Genre("Tentáculos", "tentaculos"),
|
||||||
Genre("Virgen","virgen"),
|
Genre("Virgen", "virgen"),
|
||||||
Genre("Yaoi","yaoi"),
|
Genre("Yaoi", "yaoi"),
|
||||||
Genre("Yuri","yuri")
|
Genre("Yuri", "yuri")
|
||||||
)
|
)
|
||||||
private open class UriPartFilter(displayName: String, val vals: Array<Pair<String, String>>) :
|
private open class UriPartFilter(displayName: String, val vals: Array<Pair<String, String>>) :
|
||||||
Filter.Select<String>(displayName, vals.map { it.first }.toTypedArray()) {
|
Filter.Select<String>(displayName, vals.map { it.first }.toTypedArray()) {
|
||||||
fun toUriPart() = vals[state].second
|
fun toUriPart() = vals[state].second
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,17 +8,21 @@ import com.google.gson.JsonElement
|
||||||
import com.google.gson.JsonObject
|
import com.google.gson.JsonObject
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.network.POST
|
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.source.online.ParsedHttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
import eu.kanade.tachiyomi.util.asJsoup
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.Locale
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
import okhttp3.RequestBody
|
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
|
import okhttp3.RequestBody
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.Locale
|
|
||||||
|
|
||||||
class InManga : ParsedHttpSource() {
|
class InManga : ParsedHttpSource() {
|
||||||
|
|
||||||
|
|
|
@ -2,26 +2,37 @@ package eu.kanade.tachiyomi.extension.es.lectormanga
|
||||||
|
|
||||||
import android.app.Application
|
import android.app.Application
|
||||||
import android.content.SharedPreferences
|
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.network.GET
|
||||||
import eu.kanade.tachiyomi.source.ConfigurableSource
|
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.source.online.ParsedHttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
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.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import uy.kohesive.injekt.Injekt
|
import uy.kohesive.injekt.Injekt
|
||||||
import uy.kohesive.injekt.api.get
|
import uy.kohesive.injekt.api.get
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Note: this source is similar to TuMangaOnline.
|
* Note: this source is similar to TuMangaOnline.
|
||||||
*/
|
*/
|
||||||
class LectorManga : ConfigurableSource, ParsedHttpSource() {
|
class LectorManga : ConfigurableSource, ParsedHttpSource() {
|
||||||
|
|
||||||
//Info
|
// Info
|
||||||
|
|
||||||
override val name = "LectorManga"
|
override val name = "LectorManga"
|
||||||
override val baseUrl = "https://lectormanga.com"
|
override val baseUrl = "https://lectormanga.com"
|
||||||
|
@ -49,7 +60,7 @@ class LectorManga : ConfigurableSource, ParsedHttpSource() {
|
||||||
.toString()
|
.toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
//Popular
|
// Popular
|
||||||
|
|
||||||
override fun popularMangaRequest(page: Int) = GET("$baseUrl/library?order_item=likes_count&order_dir=desc&type=&filter_by=title&page=$page", headers)
|
override fun popularMangaRequest(page: Int) = GET("$baseUrl/library?order_item=likes_count&order_dir=desc&type=&filter_by=title&page=$page", headers)
|
||||||
override fun popularMangaNextPageSelector() = ".pagination .page-item:not(.disabled) a[rel='next']"
|
override fun popularMangaNextPageSelector() = ".pagination .page-item:not(.disabled) a[rel='next']"
|
||||||
|
@ -60,15 +71,14 @@ class LectorManga : ConfigurableSource, ParsedHttpSource() {
|
||||||
thumbnail_url = element.select("img").attr("src")
|
thumbnail_url = element.select("img").attr("src")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Latest
|
||||||
//Latest
|
|
||||||
|
|
||||||
override fun latestUpdatesRequest(page: Int) = GET("$baseUrl/library?order_item=creation&order_dir=desc&page=$page", headers)
|
override fun latestUpdatesRequest(page: Int) = GET("$baseUrl/library?order_item=creation&order_dir=desc&page=$page", headers)
|
||||||
override fun latestUpdatesNextPageSelector() = popularMangaNextPageSelector()
|
override fun latestUpdatesNextPageSelector() = popularMangaNextPageSelector()
|
||||||
override fun latestUpdatesSelector() = popularMangaSelector()
|
override fun latestUpdatesSelector() = popularMangaSelector()
|
||||||
override fun latestUpdatesFromElement(element: Element) = popularMangaFromElement(element)
|
override fun latestUpdatesFromElement(element: Element) = popularMangaFromElement(element)
|
||||||
|
|
||||||
//Search
|
// Search
|
||||||
|
|
||||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
||||||
val url = HttpUrl.parse("$baseUrl/library")!!.newBuilder()
|
val url = HttpUrl.parse("$baseUrl/library")!!.newBuilder()
|
||||||
|
@ -139,7 +149,7 @@ class LectorManga : ConfigurableSource, ParsedHttpSource() {
|
||||||
override fun searchMangaNextPageSelector() = popularMangaNextPageSelector()
|
override fun searchMangaNextPageSelector() = popularMangaNextPageSelector()
|
||||||
override fun searchMangaFromElement(element: Element): SManga = popularMangaFromElement(element)
|
override fun searchMangaFromElement(element: Element): SManga = popularMangaFromElement(element)
|
||||||
|
|
||||||
//Details
|
// Details
|
||||||
|
|
||||||
override fun mangaDetailsParse(document: Document) = SManga.create().apply {
|
override fun mangaDetailsParse(document: Document) = SManga.create().apply {
|
||||||
genre = document.select("a.py-2").joinToString(", ") {
|
genre = document.select("a.py-2").joinToString(", ") {
|
||||||
|
@ -156,10 +166,10 @@ class LectorManga : ConfigurableSource, ParsedHttpSource() {
|
||||||
else -> SManga.UNKNOWN
|
else -> SManga.UNKNOWN
|
||||||
}
|
}
|
||||||
|
|
||||||
//Chapters
|
// Chapters
|
||||||
|
|
||||||
override fun chapterListParse(response: Response): List<SChapter> = mutableListOf<SChapter>().apply {
|
override fun chapterListParse(response: Response): List<SChapter> = mutableListOf<SChapter>().apply {
|
||||||
time = serverTime() //Get time when the chapter page is opened
|
time = serverTime() // Get time when the chapter page is opened
|
||||||
|
|
||||||
val document = response.asJsoup()
|
val document = response.asJsoup()
|
||||||
val chapterUrl = response.request().url().toString()
|
val chapterUrl = response.request().url().toString()
|
||||||
|
@ -213,26 +223,26 @@ class LectorManga : ConfigurableSource, ParsedHttpSource() {
|
||||||
.parse(date)?.time ?: 0
|
.parse(date)?.time ?: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
//Utilities
|
// Utilities
|
||||||
|
|
||||||
private var time = serverTime() //Grab time at app launch, can be updated
|
private var time = serverTime() // Grab time at app launch, can be updated
|
||||||
private fun serverTime(): String {
|
private fun serverTime(): String {
|
||||||
val formatter = SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.US)
|
val formatter = SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.US)
|
||||||
formatter.timeZone = TimeZone.getTimeZone("GMT+1") //Convert time to match server
|
formatter.timeZone = TimeZone.getTimeZone("GMT+1") // Convert time to match server
|
||||||
return formatter.format(Date())
|
return formatter.format(Date())
|
||||||
}
|
}
|
||||||
|
|
||||||
//Pages
|
// Pages
|
||||||
|
|
||||||
override fun pageListRequest(chapter: SChapter): Request {
|
override fun pageListRequest(chapter: SChapter): Request {
|
||||||
val (chapterURL, chapterID) = chapter.url.split("#")
|
val (chapterURL, chapterID) = chapter.url.split("#")
|
||||||
val response = client.newCall(GET(chapterURL, headers)).execute() //Get chapter page for current token
|
val response = client.newCall(GET(chapterURL, headers)).execute() // Get chapter page for current token
|
||||||
if (!response.isSuccessful) throw Exception("Lector Manga HTTP Error ${response.code()}")
|
if (!response.isSuccessful) throw Exception("Lector Manga HTTP Error ${response.code()}")
|
||||||
val document = response.asJsoup()
|
val document = response.asJsoup()
|
||||||
val getUrl = document.select("form#$chapterID").attr("action") + "/$time" //Get redirect URL
|
val getUrl = document.select("form#$chapterID").attr("action") + "/$time" // Get redirect URL
|
||||||
val token = document.select("form#$chapterID input").attr("value") //Get token
|
val token = document.select("form#$chapterID input").attr("value") // Get token
|
||||||
val method = document.select("form#$chapterID").attr("method") //Check POST or GET
|
val method = document.select("form#$chapterID").attr("method") // Check POST or GET
|
||||||
time = serverTime() //Update time for next chapter
|
time = serverTime() // Update time for next chapter
|
||||||
|
|
||||||
val getHeaders = headersBuilder()
|
val getHeaders = headersBuilder()
|
||||||
.add("User-Agent", userAgent)
|
.add("User-Agent", userAgent)
|
||||||
|
@ -275,7 +285,7 @@ class LectorManga : ConfigurableSource, ParsedHttpSource() {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
val pageList = document.select("#viewer-pages-select").first().select("option").map { it.attr("value").toInt() }
|
val pageList = document.select("#viewer-pages-select").first().select("option").map { it.attr("value").toInt() }
|
||||||
val url = document.baseUri().substringBefore("/paginated") //Accounts for url ending in number "/paginated/1"
|
val url = document.baseUri().substringBefore("/paginated") // Accounts for url ending in number "/paginated/1"
|
||||||
pageList.forEach {
|
pageList.forEach {
|
||||||
add(Page(it, "$url/paginated/$it"))
|
add(Page(it, "$url/paginated/$it"))
|
||||||
}
|
}
|
||||||
|
@ -284,7 +294,7 @@ class LectorManga : ConfigurableSource, ParsedHttpSource() {
|
||||||
|
|
||||||
override fun imageUrlParse(document: Document): String = document.select("img.viewer-image").attr("src")
|
override fun imageUrlParse(document: Document): String = document.select("img.viewer-image").attr("src")
|
||||||
|
|
||||||
//Filters
|
// Filters
|
||||||
|
|
||||||
private class Types : UriPartFilter("Filtrar por tipo", arrayOf(
|
private class Types : UriPartFilter("Filtrar por tipo", arrayOf(
|
||||||
Pair("Ver todo", ""),
|
Pair("Ver todo", ""),
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package eu.kanade.tachiyomi.extension.es.mangamx
|
package eu.kanade.tachiyomi.extension.es.mangamx
|
||||||
|
|
||||||
|
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import com.github.salomonbrys.kotson.get
|
import com.github.salomonbrys.kotson.get
|
||||||
import com.github.salomonbrys.kotson.string
|
import com.github.salomonbrys.kotson.string
|
||||||
|
@ -8,20 +7,25 @@ import com.google.gson.JsonElement
|
||||||
import com.google.gson.JsonParser
|
import com.google.gson.JsonParser
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.network.POST
|
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.source.online.ParsedHttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
import eu.kanade.tachiyomi.util.asJsoup
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.Locale
|
||||||
import okhttp3.FormBody
|
import okhttp3.FormBody
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.Locale
|
|
||||||
|
|
||||||
open class MangaMx : ParsedHttpSource() {
|
open class MangaMx : ParsedHttpSource() {
|
||||||
|
|
||||||
//Info
|
// Info
|
||||||
|
|
||||||
override val name = "MangaMx"
|
override val name = "MangaMx"
|
||||||
override val baseUrl = "https://manga-mx.com"
|
override val baseUrl = "https://manga-mx.com"
|
||||||
|
@ -29,7 +33,7 @@ open class MangaMx : ParsedHttpSource() {
|
||||||
override val supportsLatest = true
|
override val supportsLatest = true
|
||||||
private var csrfToken = ""
|
private var csrfToken = ""
|
||||||
|
|
||||||
//Popular
|
// Popular
|
||||||
|
|
||||||
override fun popularMangaRequest(page: Int) =
|
override fun popularMangaRequest(page: Int) =
|
||||||
GET("$baseUrl/directorio?filtro=visitas&p=$page", headers)
|
GET("$baseUrl/directorio?filtro=visitas&p=$page", headers)
|
||||||
|
@ -57,7 +61,7 @@ open class MangaMx : ParsedHttpSource() {
|
||||||
return MangasPage(mangas, hasNextPage)
|
return MangasPage(mangas, hasNextPage)
|
||||||
}
|
}
|
||||||
|
|
||||||
//Latest
|
// Latest
|
||||||
|
|
||||||
override fun latestUpdatesRequest(page: Int) = GET("$baseUrl/recientes?p=$page", headers)
|
override fun latestUpdatesRequest(page: Int) = GET("$baseUrl/recientes?p=$page", headers)
|
||||||
override fun latestUpdatesNextPageSelector(): String? = popularMangaNextPageSelector()
|
override fun latestUpdatesNextPageSelector(): String? = popularMangaNextPageSelector()
|
||||||
|
@ -70,7 +74,7 @@ open class MangaMx : ParsedHttpSource() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Search
|
// Search
|
||||||
|
|
||||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
||||||
if (query.isNotBlank()) {
|
if (query.isNotBlank()) {
|
||||||
|
@ -83,7 +87,7 @@ open class MangaMx : ParsedHttpSource() {
|
||||||
return POST("$baseUrl/buscar", searchHeaders, formBody)
|
return POST("$baseUrl/buscar", searchHeaders, formBody)
|
||||||
} else {
|
} else {
|
||||||
val uri = Uri.parse("$baseUrl/directorio").buildUpon()
|
val uri = Uri.parse("$baseUrl/directorio").buildUpon()
|
||||||
//Append uri filters
|
// Append uri filters
|
||||||
for (filter in filters) {
|
for (filter in filters) {
|
||||||
when (filter) {
|
when (filter) {
|
||||||
is StatusFilter -> uri.appendQueryParameter(
|
is StatusFilter -> uri.appendQueryParameter(
|
||||||
|
@ -146,7 +150,7 @@ open class MangaMx : ParsedHttpSource() {
|
||||||
thumbnail_url = jsonElement["img"].string.replace("/thumb", "/cover")
|
thumbnail_url = jsonElement["img"].string.replace("/thumb", "/cover")
|
||||||
}
|
}
|
||||||
|
|
||||||
//Details
|
// Details
|
||||||
|
|
||||||
override fun mangaDetailsParse(document: Document): SManga {
|
override fun mangaDetailsParse(document: Document): SManga {
|
||||||
val manga = SManga.create()
|
val manga = SManga.create()
|
||||||
|
@ -161,13 +165,13 @@ open class MangaMx : ParsedHttpSource() {
|
||||||
manga.genre = document.select("div#categ a").joinToString(", ") { it.text() }
|
manga.genre = document.select("div#categ a").joinToString(", ") { it.text() }
|
||||||
manga.status = when (document.select("span#desarrollo")?.first()?.text()) {
|
manga.status = when (document.select("span#desarrollo")?.first()?.text()) {
|
||||||
"En desarrollo" -> SManga.ONGOING
|
"En desarrollo" -> SManga.ONGOING
|
||||||
//"Completed" -> SManga.COMPLETED
|
// "Completed" -> SManga.COMPLETED
|
||||||
else -> SManga.UNKNOWN
|
else -> SManga.UNKNOWN
|
||||||
}
|
}
|
||||||
return manga
|
return manga
|
||||||
}
|
}
|
||||||
|
|
||||||
//Chapters
|
// Chapters
|
||||||
|
|
||||||
override fun chapterListSelector(): String = "div#c_list a"
|
override fun chapterListSelector(): String = "div#c_list a"
|
||||||
override fun chapterFromElement(element: Element): SChapter = SChapter.create().apply {
|
override fun chapterFromElement(element: Element): SChapter = SChapter.create().apply {
|
||||||
|
@ -181,7 +185,7 @@ open class MangaMx : ParsedHttpSource() {
|
||||||
return SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.US).parse(date)?.time ?: 0
|
return SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.US).parse(date)?.time ?: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
//Pages
|
// Pages
|
||||||
|
|
||||||
override fun pageListParse(document: Document): List<Page> = mutableListOf<Page>().apply {
|
override fun pageListParse(document: Document): List<Page> = mutableListOf<Page>().apply {
|
||||||
val script = document.select("script:containsData(hojas)").html()
|
val script = document.select("script:containsData(hojas)").html()
|
||||||
|
@ -195,8 +199,8 @@ open class MangaMx : ParsedHttpSource() {
|
||||||
|
|
||||||
override fun imageUrlParse(document: Document) = throw Exception("Not Used")
|
override fun imageUrlParse(document: Document) = throw Exception("Not Used")
|
||||||
|
|
||||||
//Filters
|
// Filters
|
||||||
|
|
||||||
override fun getFilterList() = FilterList(
|
override fun getFilterList() = FilterList(
|
||||||
Filter.Header("NOTA: ¡Ignorado si usa la búsqueda de texto!"),
|
Filter.Header("NOTA: ¡Ignorado si usa la búsqueda de texto!"),
|
||||||
Filter.Separator(),
|
Filter.Separator(),
|
||||||
|
@ -207,7 +211,6 @@ open class MangaMx : ParsedHttpSource() {
|
||||||
OrderFilter("Orden", orderArray)
|
OrderFilter("Orden", orderArray)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
private class StatusFilter(name: String, values: Array<Pair<String, String>>) :
|
private class StatusFilter(name: String, values: Array<Pair<String, String>>) :
|
||||||
Filter.Select<String>(name, values.map { it.first }.toTypedArray())
|
Filter.Select<String>(name, values.map { it.first }.toTypedArray())
|
||||||
|
|
||||||
|
@ -251,4 +254,3 @@ open class MangaMx : ParsedHttpSource() {
|
||||||
Pair("Ascendente", "asc")
|
Pair("Ascendente", "asc")
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,14 @@
|
||||||
package eu.kanade.tachiyomi.extension.es.tmohentai
|
package eu.kanade.tachiyomi.extension.es.tmohentai
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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.source.online.ParsedHttpSource
|
||||||
import okhttp3.*
|
import okhttp3.HttpUrl
|
||||||
|
import okhttp3.Request
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
|
|
||||||
|
@ -39,7 +44,7 @@ class TMOHentai : ParsedHttpSource() {
|
||||||
|
|
||||||
override fun latestUpdatesNextPageSelector() = popularMangaNextPageSelector()
|
override fun latestUpdatesNextPageSelector() = popularMangaNextPageSelector()
|
||||||
|
|
||||||
override fun mangaDetailsParse(document: Document) = SManga.create().apply {
|
override fun mangaDetailsParse(document: Document) = SManga.create().apply {
|
||||||
val parsedInformation = document.select("div.row > div.panel.panel-primary").text()
|
val parsedInformation = document.select("div.row > div.panel.panel-primary").text()
|
||||||
val authorAndArtist = parsedInformation.substringAfter("Groups").substringBefore("Magazines").trim()
|
val authorAndArtist = parsedInformation.substringAfter("Groups").substringBefore("Magazines").trim()
|
||||||
|
|
||||||
|
@ -213,5 +218,4 @@ class TMOHentai : ParsedHttpSource() {
|
||||||
Pair("Popularidad", "popularity")
|
Pair("Popularidad", "popularity")
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,27 +6,35 @@ import android.support.v7.preference.ListPreference
|
||||||
import android.support.v7.preference.PreferenceScreen
|
import android.support.v7.preference.PreferenceScreen
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.source.ConfigurableSource
|
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.source.online.ParsedHttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
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.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import uy.kohesive.injekt.Injekt
|
import uy.kohesive.injekt.Injekt
|
||||||
import uy.kohesive.injekt.api.get
|
import uy.kohesive.injekt.api.get
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
class TuMangaOnline : ConfigurableSource, ParsedHttpSource() {
|
class TuMangaOnline : ConfigurableSource, ParsedHttpSource() {
|
||||||
|
|
||||||
//Info
|
// Info
|
||||||
|
|
||||||
override val name = "TuMangaOnline"
|
override val name = "TuMangaOnline"
|
||||||
override val baseUrl = "https://lectortmo.com"
|
override val baseUrl = "https://lectortmo.com"
|
||||||
override val lang = "es"
|
override val lang = "es"
|
||||||
override val supportsLatest = true
|
override val supportsLatest = true
|
||||||
|
|
||||||
//Client
|
// Client
|
||||||
|
|
||||||
private val userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36"
|
private val userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36"
|
||||||
override fun headersBuilder(): Headers.Builder {
|
override fun headersBuilder(): Headers.Builder {
|
||||||
|
@ -50,7 +58,7 @@ class TuMangaOnline : ConfigurableSource, ParsedHttpSource() {
|
||||||
.toString()
|
.toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
//Popular
|
// Popular
|
||||||
|
|
||||||
override fun popularMangaRequest(page: Int) = GET("$baseUrl/library?order_item=likes_count&order_dir=desc&filter_by=title&_page=1&page=$page", headers)
|
override fun popularMangaRequest(page: Int) = GET("$baseUrl/library?order_item=likes_count&order_dir=desc&filter_by=title&_page=1&page=$page", headers)
|
||||||
override fun popularMangaNextPageSelector() = "a.page-link"
|
override fun popularMangaNextPageSelector() = "a.page-link"
|
||||||
|
@ -63,21 +71,21 @@ class TuMangaOnline : ConfigurableSource, ParsedHttpSource() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Latest
|
// Latest
|
||||||
|
|
||||||
override fun latestUpdatesRequest(page: Int) = GET("$baseUrl/library?order_item=creation&order_dir=desc&filter_by=title&_page=1&page=$page", headers)
|
override fun latestUpdatesRequest(page: Int) = GET("$baseUrl/library?order_item=creation&order_dir=desc&filter_by=title&_page=1&page=$page", headers)
|
||||||
override fun latestUpdatesNextPageSelector() = popularMangaNextPageSelector()
|
override fun latestUpdatesNextPageSelector() = popularMangaNextPageSelector()
|
||||||
override fun latestUpdatesSelector() = popularMangaSelector()
|
override fun latestUpdatesSelector() = popularMangaSelector()
|
||||||
override fun latestUpdatesFromElement(element: Element) = popularMangaFromElement(element)
|
override fun latestUpdatesFromElement(element: Element) = popularMangaFromElement(element)
|
||||||
|
|
||||||
//Search
|
// Search
|
||||||
|
|
||||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
||||||
val url = HttpUrl.parse("$baseUrl/library")!!.newBuilder()
|
val url = HttpUrl.parse("$baseUrl/library")!!.newBuilder()
|
||||||
|
|
||||||
url.addQueryParameter("title", query)
|
url.addQueryParameter("title", query)
|
||||||
url.addQueryParameter("page", page.toString())
|
url.addQueryParameter("page", page.toString())
|
||||||
url.addQueryParameter("_page", "1") //Extra Query to Prevent Scrapping aka without it = 403
|
url.addQueryParameter("_page", "1") // Extra Query to Prevent Scrapping aka without it = 403
|
||||||
|
|
||||||
filters.forEach { filter ->
|
filters.forEach { filter ->
|
||||||
when (filter) {
|
when (filter) {
|
||||||
|
@ -142,7 +150,7 @@ class TuMangaOnline : ConfigurableSource, ParsedHttpSource() {
|
||||||
override fun searchMangaNextPageSelector() = popularMangaNextPageSelector()
|
override fun searchMangaNextPageSelector() = popularMangaNextPageSelector()
|
||||||
override fun searchMangaFromElement(element: Element): SManga = popularMangaFromElement(element)
|
override fun searchMangaFromElement(element: Element): SManga = popularMangaFromElement(element)
|
||||||
|
|
||||||
//Details
|
// Details
|
||||||
|
|
||||||
override fun mangaDetailsParse(document: Document) = SManga.create().apply {
|
override fun mangaDetailsParse(document: Document) = SManga.create().apply {
|
||||||
document.select("h5.card-title").let {
|
document.select("h5.card-title").let {
|
||||||
|
@ -165,7 +173,7 @@ class TuMangaOnline : ConfigurableSource, ParsedHttpSource() {
|
||||||
else -> SManga.UNKNOWN
|
else -> SManga.UNKNOWN
|
||||||
}
|
}
|
||||||
|
|
||||||
//Chapters
|
// Chapters
|
||||||
|
|
||||||
override fun chapterListParse(response: Response): List<SChapter> {
|
override fun chapterListParse(response: Response): List<SChapter> {
|
||||||
val document = response.asJsoup()
|
val document = response.asJsoup()
|
||||||
|
@ -224,18 +232,18 @@ class TuMangaOnline : ConfigurableSource, ParsedHttpSource() {
|
||||||
private fun parseChapterDate(date: String): Long = SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()).parse(date)?.time
|
private fun parseChapterDate(date: String): Long = SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()).parse(date)?.time
|
||||||
?: 0
|
?: 0
|
||||||
|
|
||||||
//Pages
|
// Pages
|
||||||
|
|
||||||
override fun pageListRequest(chapter: SChapter): Request {
|
override fun pageListRequest(chapter: SChapter): Request {
|
||||||
val (chapterURL, chapterID) = chapter.url.split("#")
|
val (chapterURL, chapterID) = chapter.url.split("#")
|
||||||
val response = client.newCall(GET(chapterURL, headers)).execute() //Get chapter page for current token
|
val response = client.newCall(GET(chapterURL, headers)).execute() // Get chapter page for current token
|
||||||
if (!response.isSuccessful) throw Exception("TMO HTTP Error ${response.code()}")
|
if (!response.isSuccessful) throw Exception("TMO HTTP Error ${response.code()}")
|
||||||
val document = response.asJsoup()
|
val document = response.asJsoup()
|
||||||
val script = document.select("script:containsData(submitChapterForm)").html()
|
val script = document.select("script:containsData(submitChapterForm)").html()
|
||||||
val tmotk = script.substringAfter("action+\"").substringBefore("\"}")
|
val tmotk = script.substringAfter("action+\"").substringBefore("\"}")
|
||||||
val geturl = document.select("form#$chapterID").attr("action") + tmotk //Get redirect URL
|
val geturl = document.select("form#$chapterID").attr("action") + tmotk // Get redirect URL
|
||||||
val token = document.select("form#$chapterID input").attr("value") //Get token
|
val token = document.select("form#$chapterID input").attr("value") // Get token
|
||||||
val method = document.select("form#$chapterID").attr("method") //Check POST or GET
|
val method = document.select("form#$chapterID").attr("method") // Check POST or GET
|
||||||
|
|
||||||
val getHeaders = headersBuilder()
|
val getHeaders = headersBuilder()
|
||||||
.add("User-Agent", userAgent)
|
.add("User-Agent", userAgent)
|
||||||
|
@ -283,7 +291,7 @@ class TuMangaOnline : ConfigurableSource, ParsedHttpSource() {
|
||||||
return document.select("div.viewer-container > div.img-container > img.viewer-image").attr("src")
|
return document.select("div.viewer-container > div.img-container > img.viewer-image").attr("src")
|
||||||
}
|
}
|
||||||
|
|
||||||
//Filters
|
// Filters
|
||||||
|
|
||||||
private class Types : UriPartFilter("Filtrar por tipo", arrayOf(
|
private class Types : UriPartFilter("Filtrar por tipo", arrayOf(
|
||||||
Pair("Ver todo", ""),
|
Pair("Ver todo", ""),
|
||||||
|
|
|
@ -1,11 +1,16 @@
|
||||||
package eu.kanade.tachiyomi.extension.es.vcpvmp
|
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.HttpUrl
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import org.jsoup.nodes.*
|
import org.jsoup.nodes.Document
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import org.jsoup.nodes.Element
|
||||||
import eu.kanade.tachiyomi.source.model.*
|
|
||||||
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
|
||||||
|
|
||||||
open class VCPVMP(override val name: String, override val baseUrl: String) : ParsedHttpSource() {
|
open class VCPVMP(override val name: String, override val baseUrl: String) : ParsedHttpSource() {
|
||||||
|
|
||||||
|
@ -39,7 +44,7 @@ open class VCPVMP(override val name: String, override val baseUrl: String) : Par
|
||||||
|
|
||||||
override fun popularMangaNextPageSelector() = "ul.pagination > li.active + li"
|
override fun popularMangaNextPageSelector() = "ul.pagination > li.active + li"
|
||||||
|
|
||||||
override fun mangaDetailsParse(document: Document) = SManga.create().apply {
|
override fun mangaDetailsParse(document: Document) = SManga.create().apply {
|
||||||
document.select("div#catag").let {
|
document.select("div#catag").let {
|
||||||
genre = document.select("div#tagsin > a[rel=tag]").joinToString(", ") {
|
genre = document.select("div#tagsin > a[rel=tag]").joinToString(", ") {
|
||||||
it.text()
|
it.text()
|
||||||
|
@ -52,12 +57,11 @@ open class VCPVMP(override val name: String, override val baseUrl: String) : Par
|
||||||
|
|
||||||
override fun chapterListSelector() = "div#posts"
|
override fun chapterListSelector() = "div#posts"
|
||||||
|
|
||||||
override fun chapterFromElement(element: Element) = SChapter.create().apply {
|
override fun chapterFromElement(element: Element) = SChapter.create().apply {
|
||||||
name = element.select("h1").text()
|
name = element.select("h1").text()
|
||||||
setUrlWithoutDomain(element.baseUri())
|
setUrlWithoutDomain(element.baseUri())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
override fun pageListRequest(chapter: SChapter) = GET(baseUrl + chapter.url)
|
override fun pageListRequest(chapter: SChapter) = GET(baseUrl + chapter.url)
|
||||||
|
|
||||||
override fun pageListParse(document: Document): List<Page> = mutableListOf<Page>().apply {
|
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("Zzomp", "252"),
|
||||||
Pair("ZZZ Comics", "2839")
|
Pair("ZZZ Comics", "2839")
|
||||||
))
|
))
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
package eu.kanade.tachiyomi.extension.es.vcpvmp
|
package eu.kanade.tachiyomi.extension.es.vcpvmp
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.source.*
|
import eu.kanade.tachiyomi.source.Source
|
||||||
import eu.kanade.tachiyomi.source.model.*
|
import eu.kanade.tachiyomi.source.SourceFactory
|
||||||
|
import eu.kanade.tachiyomi.source.model.Filter
|
||||||
|
|
||||||
class VCPVMPFactory : SourceFactory {
|
class VCPVMPFactory : SourceFactory {
|
||||||
override fun createSources(): List<Source> = listOf(
|
override fun createSources(): List<Source> = listOf(
|
||||||
|
@ -363,7 +364,6 @@ class VMP : VCPVMP("VMP", "https://vermangasporno.com") {
|
||||||
Pair("Zoids Shinseiki Zero", "153"),
|
Pair("Zoids Shinseiki Zero", "153"),
|
||||||
Pair("Zombieland Saga", "2059")
|
Pair("Zombieland Saga", "2059")
|
||||||
))
|
))
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
open class UriPartFilter(displayName: String, val vals: Array<Pair<String, String>>) :
|
open class UriPartFilter(displayName: String, val vals: Array<Pair<String, String>>) :
|
||||||
|
|
|
@ -2,7 +2,11 @@ package eu.kanade.tachiyomi.extension.es.zahard
|
||||||
|
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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.source.online.ParsedHttpSource
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
|
@ -28,7 +32,7 @@ class Zahard : ParsedHttpSource() {
|
||||||
throw Exception("Source does not support search")
|
throw Exception("Source does not support search")
|
||||||
} else {
|
} else {
|
||||||
val uri = Uri.parse("$baseUrl/").buildUpon()
|
val uri = Uri.parse("$baseUrl/").buildUpon()
|
||||||
//Append uri filters
|
// Append uri filters
|
||||||
filters.forEach {
|
filters.forEach {
|
||||||
if (it is UriFilter)
|
if (it is UriFilter)
|
||||||
it.addToUri(uri)
|
it.addToUri(uri)
|
||||||
|
@ -38,9 +42,9 @@ class Zahard : ParsedHttpSource() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun mangaDetailsRequest(manga: SManga) = GET( manga.url, headers)
|
override fun mangaDetailsRequest(manga: SManga) = GET(manga.url, headers)
|
||||||
override fun chapterListRequest(manga: SManga) = mangaDetailsRequest(manga)
|
override fun chapterListRequest(manga: SManga) = mangaDetailsRequest(manga)
|
||||||
override fun pageListRequest(chapter: SChapter) = GET( chapter.url, headers)
|
override fun pageListRequest(chapter: SChapter) = GET(chapter.url, headers)
|
||||||
|
|
||||||
override fun popularMangaFromElement(element: Element) = mangaFromElement(element)
|
override fun popularMangaFromElement(element: Element) = mangaFromElement(element)
|
||||||
override fun latestUpdatesFromElement(element: Element) = mangaFromElement(element)
|
override fun latestUpdatesFromElement(element: Element) = mangaFromElement(element)
|
||||||
|
@ -88,7 +92,7 @@ class Zahard : ParsedHttpSource() {
|
||||||
override fun latestUpdatesSelector() = throw Exception("Not used")
|
override fun latestUpdatesSelector() = throw Exception("Not used")
|
||||||
override fun latestUpdatesNextPageSelector() = throw Exception("Not used")
|
override fun latestUpdatesNextPageSelector() = throw Exception("Not used")
|
||||||
override fun latestUpdatesRequest(page: Int) = throw Exception("Not used")
|
override fun latestUpdatesRequest(page: Int) = throw Exception("Not used")
|
||||||
override fun imageUrlParse(document: Document) = throw Exception ("Not Used")
|
override fun imageUrlParse(document: Document) = throw Exception("Not Used")
|
||||||
|
|
||||||
override fun getFilterList() = FilterList(
|
override fun getFilterList() = FilterList(
|
||||||
Filter.Header("NOTE: Filters are ignored if using text search."),
|
Filter.Header("NOTE: Filters are ignored if using text search."),
|
||||||
|
@ -96,14 +100,14 @@ class Zahard : ParsedHttpSource() {
|
||||||
TypeFilter(),
|
TypeFilter(),
|
||||||
GenreFilter()
|
GenreFilter()
|
||||||
)
|
)
|
||||||
private class TypeFilter : UriSelectFilter("Type","biblioteca", arrayOf(
|
private class TypeFilter : UriSelectFilter("Type", "biblioteca", arrayOf(
|
||||||
Pair("all", "All"),
|
Pair("all", "All"),
|
||||||
Pair("manga", "Manga"),
|
Pair("manga", "Manga"),
|
||||||
Pair("manhwa", "Manhwa"),
|
Pair("manhwa", "Manhwa"),
|
||||||
Pair("manhua", "Manhua")
|
Pair("manhua", "Manhua")
|
||||||
))
|
))
|
||||||
|
|
||||||
private class GenreFilter : UriSelectFilter("Genre","genero", arrayOf(
|
private class GenreFilter : UriSelectFilter("Genre", "genero", arrayOf(
|
||||||
Pair("all", "ALL"),
|
Pair("all", "ALL"),
|
||||||
Pair("accion", "Acción"),
|
Pair("accion", "Acción"),
|
||||||
Pair("aventura", "Aventura"),
|
Pair("aventura", "Aventura"),
|
||||||
|
@ -157,9 +161,13 @@ class Zahard : ParsedHttpSource() {
|
||||||
Pair("Comics", "Comics")
|
Pair("Comics", "Comics")
|
||||||
))
|
))
|
||||||
|
|
||||||
private open class UriSelectFilter(displayName: String, val uriParam: String, val vals: Array<Pair<String, String>>,
|
private open class UriSelectFilter(
|
||||||
val firstIsUnspecified: Boolean = true,
|
displayName: String,
|
||||||
defaultValue: Int = 0) :
|
val uriParam: String,
|
||||||
|
val vals: Array<Pair<String, String>>,
|
||||||
|
val firstIsUnspecified: Boolean = true,
|
||||||
|
defaultValue: Int = 0
|
||||||
|
) :
|
||||||
Filter.Select<String>(displayName, vals.map { it.second }.toTypedArray(), defaultValue), UriFilter {
|
Filter.Select<String>(displayName, vals.map { it.second }.toTypedArray(), defaultValue), UriFilter {
|
||||||
override fun addToUri(uri: Uri.Builder) {
|
override fun addToUri(uri: Uri.Builder) {
|
||||||
if (state != 0 || !firstIsUnspecified)
|
if (state != 0 || !firstIsUnspecified)
|
||||||
|
@ -174,6 +182,4 @@ class Zahard : ParsedHttpSource() {
|
||||||
private interface UriFilter {
|
private interface UriFilter {
|
||||||
fun addToUri(uri: Uri.Builder)
|
fun addToUri(uri: Uri.Builder)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,11 @@ import eu.kanade.tachiyomi.source.model.SChapter
|
||||||
import eu.kanade.tachiyomi.source.model.SManga
|
import eu.kanade.tachiyomi.source.model.SManga
|
||||||
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
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.FormBody
|
||||||
import okhttp3.MediaType
|
import okhttp3.MediaType
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
|
@ -28,11 +33,6 @@ import okhttp3.ResponseBody
|
||||||
import org.apache.commons.lang3.StringUtils
|
import org.apache.commons.lang3.StringUtils
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
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() {
|
class Japscan : ParsedHttpSource() {
|
||||||
|
|
||||||
|
@ -101,8 +101,7 @@ class Japscan : ParsedHttpSource() {
|
||||||
createKeysheet(doc, doc2)
|
createKeysheet(doc, doc2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Popular
|
||||||
//Popular
|
|
||||||
override fun popularMangaRequest(page: Int): Request {
|
override fun popularMangaRequest(page: Int): Request {
|
||||||
return GET("$baseUrl/mangas/", headers)
|
return GET("$baseUrl/mangas/", headers)
|
||||||
}
|
}
|
||||||
|
@ -135,7 +134,7 @@ class Japscan : ParsedHttpSource() {
|
||||||
return manga
|
return manga
|
||||||
}
|
}
|
||||||
|
|
||||||
//Latest
|
// Latest
|
||||||
override fun latestUpdatesRequest(page: Int): Request {
|
override fun latestUpdatesRequest(page: Int): Request {
|
||||||
return GET(baseUrl, headers)
|
return GET(baseUrl, headers)
|
||||||
}
|
}
|
||||||
|
@ -155,7 +154,7 @@ class Japscan : ParsedHttpSource() {
|
||||||
override fun latestUpdatesSelector() = "#chapters > div > h3.text-truncate"
|
override fun latestUpdatesSelector() = "#chapters > div > h3.text-truncate"
|
||||||
override fun latestUpdatesFromElement(element: Element): SManga = popularMangaFromElement(element)
|
override fun latestUpdatesFromElement(element: Element): SManga = popularMangaFromElement(element)
|
||||||
|
|
||||||
//Search
|
// Search
|
||||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
||||||
if (query.isEmpty()) {
|
if (query.isEmpty()) {
|
||||||
val uri = Uri.parse(baseUrl).buildUpon()
|
val uri = Uri.parse(baseUrl).buildUpon()
|
||||||
|
@ -204,7 +203,6 @@ class Japscan : ParsedHttpSource() {
|
||||||
|
|
||||||
return MangasPage(mangas, hasNextPage)
|
return MangasPage(mangas, hasNextPage)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun searchMangaFromElement(element: Element): SManga = SManga.create().apply {
|
override fun searchMangaFromElement(element: Element): SManga = SManga.create().apply {
|
||||||
|
@ -249,9 +247,8 @@ class Japscan : ParsedHttpSource() {
|
||||||
|
|
||||||
override fun chapterListSelector() = "#chapters_list > div.collapse > div.chapters_list" +
|
override fun chapterListSelector() = "#chapters_list > div.collapse > div.chapters_list" +
|
||||||
":not(:has(.badge:contains(SPOILER),.badge:contains(RAW),.badge:contains(VUS)))"
|
":not(:has(.badge:contains(SPOILER),.badge:contains(RAW),.badge:contains(VUS)))"
|
||||||
//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.
|
// 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.
|
// 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 {
|
override fun chapterFromElement(element: Element): SChapter {
|
||||||
val urlElement = element.select("a").first()
|
val urlElement = element.select("a").first()
|
||||||
|
@ -259,7 +256,7 @@ class Japscan : ParsedHttpSource() {
|
||||||
val chapter = SChapter.create()
|
val chapter = SChapter.create()
|
||||||
chapter.setUrlWithoutDomain(urlElement.attr("href"))
|
chapter.setUrlWithoutDomain(urlElement.attr("href"))
|
||||||
chapter.name = urlElement.ownText()
|
chapter.name = urlElement.ownText()
|
||||||
//Using ownText() doesn't include childs' text, like "VUS" or "RAW" badges, in the chapter name.
|
// Using ownText() doesn't include childs' text, like "VUS" or "RAW" badges, in the chapter name.
|
||||||
chapter.date_upload = element.select("> span").text().trim().let { parseChapterDate(it) }
|
chapter.date_upload = element.select("> span").text().trim().let { parseChapterDate(it) }
|
||||||
return chapter
|
return chapter
|
||||||
}
|
}
|
||||||
|
@ -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))
|
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 az = "0123456789abcdefghijklmnopqrstuvwxyz".toCharArray()
|
||||||
val ks = "0123456789abcdefghijklmnopqrstuvwxyz".toCharArray()
|
val ks = "0123456789abcdefghijklmnopqrstuvwxyz".toCharArray()
|
||||||
|
|
||||||
|
@ -292,7 +288,6 @@ class Japscan : ParsedHttpSource() {
|
||||||
for (j in 0 until realPageUrls[i].length) {
|
for (j in 0 until realPageUrls[i].length) {
|
||||||
if (realPageUrls[i][j] != pageUrls[i][j]) {
|
if (realPageUrls[i][j] != pageUrls[i][j]) {
|
||||||
ks[az.indexOf(pageUrls[i][j])] = realPageUrls[i][j]
|
ks[az.indexOf(pageUrls[i][j])] = realPageUrls[i][j]
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
keysheet = ks.joinToString("")
|
keysheet = ks.joinToString("")
|
||||||
|
@ -369,7 +364,7 @@ class Japscan : ParsedHttpSource() {
|
||||||
return output.toByteArray()
|
return output.toByteArray()
|
||||||
}
|
}
|
||||||
|
|
||||||
//Filters
|
// Filters
|
||||||
private class TextField(name: String) : Filter.Text(name)
|
private class TextField(name: String) : Filter.Text(name)
|
||||||
|
|
||||||
private class PageList(pages: Array<Int>) : Filter.Select<Int>("Page #", arrayOf(0, *pages))
|
private class PageList(pages: Array<Int>) : Filter.Select<Int>("Page #", arrayOf(0, *pages))
|
||||||
|
|
|
@ -2,7 +2,11 @@ package eu.kanade.tachiyomi.extension.fr.lirescan
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.network.asObservableSuccess
|
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.source.online.ParsedHttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
import eu.kanade.tachiyomi.util.asJsoup
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
|
@ -122,5 +126,4 @@ class LireScan : ParsedHttpSource() {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getFilterList() = FilterList()
|
override fun getFilterList() = FilterList()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package eu.kanade.tachiyomi.extension.fr.mangakawaii
|
package eu.kanade.tachiyomi.extension.fr.mangakawaii
|
||||||
|
|
||||||
|
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.source.model.FilterList
|
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.model.SManga
|
||||||
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
import eu.kanade.tachiyomi.util.asJsoup
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.Locale
|
||||||
import okhttp3.Headers
|
import okhttp3.Headers
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.Locale
|
|
||||||
|
|
||||||
|
|
||||||
class MangaKawaii : ParsedHttpSource() {
|
class MangaKawaii : ParsedHttpSource() {
|
||||||
|
|
||||||
|
@ -66,7 +64,6 @@ class MangaKawaii : ParsedHttpSource() {
|
||||||
return manga
|
return manga
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
override fun chapterFromElement(element: Element): SChapter {
|
override fun chapterFromElement(element: Element): SChapter {
|
||||||
val chapter = SChapter.create()
|
val chapter = SChapter.create()
|
||||||
chapter.url = element.select("a.list-item__title").attr("href")
|
chapter.url = element.select("a.list-item__title").attr("href")
|
||||||
|
@ -101,7 +98,7 @@ class MangaKawaii : ParsedHttpSource() {
|
||||||
val element = body.select("script:containsData(Imagesrc)").toString()
|
val element = body.select("script:containsData(Imagesrc)").toString()
|
||||||
val regex = "(data-src).*[\"]".toRegex()
|
val regex = "(data-src).*[\"]".toRegex()
|
||||||
val match = regex.findAll(element).map { it.value.substringAfter("data-src\", \" ").substringBefore("\"").trim() }
|
val match = regex.findAll(element).map { it.value.substringAfter("data-src\", \" ").substringBefore("\"").trim() }
|
||||||
//throw Exception(match.elementAt(1))
|
// throw Exception(match.elementAt(1))
|
||||||
val pages = mutableListOf<Page>()
|
val pages = mutableListOf<Page>()
|
||||||
for (i in 0 until match.count()) {
|
for (i in 0 until match.count()) {
|
||||||
pages.add(Page(i, "", match.elementAt(i)))
|
pages.add(Page(i, "", match.elementAt(i)))
|
||||||
|
|
|
@ -2,19 +2,22 @@ package eu.kanade.tachiyomi.extension.fr.scantrad
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.network.asObservableSuccess
|
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.source.online.ParsedHttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
import eu.kanade.tachiyomi.util.asJsoup
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.Calendar
|
||||||
|
import java.util.Locale
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.util.Calendar
|
|
||||||
import java.util.Locale
|
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import rx.Observable
|
import rx.Observable
|
||||||
import java.lang.Exception
|
|
||||||
|
|
||||||
class Scantrad : ParsedHttpSource() {
|
class Scantrad : ParsedHttpSource() {
|
||||||
|
|
||||||
|
@ -71,7 +74,7 @@ class Scantrad : ParsedHttpSource() {
|
||||||
manga.setUrlWithoutDomain(element.select("div.hmi-titre a").first().attr("abs:href"))
|
manga.setUrlWithoutDomain(element.select("div.hmi-titre a").first().attr("abs:href"))
|
||||||
manga.title = element.select("div.hmi-titre a").first().text()
|
manga.title = element.select("div.hmi-titre a").first().text()
|
||||||
manga.thumbnail_url = element.select("img").attr("abs:src")
|
manga.thumbnail_url = element.select("img").attr("abs:src")
|
||||||
|
|
||||||
return manga
|
return manga
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -197,5 +200,4 @@ class Scantrad : ParsedHttpSource() {
|
||||||
override fun imageUrlParse(document: Document) = throw UnsupportedOperationException("Not used")
|
override fun imageUrlParse(document: Document) = throw UnsupportedOperationException("Not used")
|
||||||
|
|
||||||
override fun getFilterList() = FilterList()
|
override fun getFilterList() = FilterList()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +1,18 @@
|
||||||
package eu.kanade.tachiyomi.extension.id.bacakomik
|
package eu.kanade.tachiyomi.extension.id.bacakomik
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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 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.Document
|
||||||
import org.jsoup.nodes.Element
|
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() {
|
class Bacakomik : ParsedHttpSource() {
|
||||||
override val name = "Bacakomik"
|
override val name = "Bacakomik"
|
||||||
|
@ -259,6 +263,4 @@ override fun mangaDetailsParse(document: Document): SManga {
|
||||||
Filter.Select<String>(displayName, vals.map { it.first }.toTypedArray()) {
|
Filter.Select<String>(displayName, vals.map { it.first }.toTypedArray()) {
|
||||||
fun toUriPart() = vals[state].second
|
fun toUriPart() = vals[state].second
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,18 +2,26 @@ package eu.kanade.tachiyomi.extension.id.bacamanga
|
||||||
|
|
||||||
import android.util.Base64
|
import android.util.Base64
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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.source.online.ParsedHttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
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.json.JSONObject
|
||||||
import org.jsoup.Jsoup
|
import org.jsoup.Jsoup
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.io.UnsupportedEncodingException
|
|
||||||
import java.net.URLDecoder
|
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
class BacaManga : ParsedHttpSource() {
|
class BacaManga : ParsedHttpSource() {
|
||||||
|
|
||||||
|
@ -117,8 +125,8 @@ class BacaManga : ParsedHttpSource() {
|
||||||
// Add date for latest chapter only
|
// Add date for latest chapter only
|
||||||
document.select("script.yoast-schema-graph").html()
|
document.select("script.yoast-schema-graph").html()
|
||||||
.let {
|
.let {
|
||||||
val date = JSONObject(it).getJSONArray("@graph").
|
val date = JSONObject(it).getJSONArray("@graph")
|
||||||
getJSONObject(3).getString("dateModified")
|
.getJSONObject(3).getString("dateModified")
|
||||||
chapters[0].date_upload = parseDate(date)
|
chapters[0].date_upload = parseDate(date)
|
||||||
}
|
}
|
||||||
return chapters
|
return chapters
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
package eu.kanade.tachiyomi.extension.id.kiryuu
|
package eu.kanade.tachiyomi.extension.id.kiryuu
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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.source.online.ParsedHttpSource
|
||||||
import okhttp3.Headers
|
import okhttp3.Headers
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
|
|
@ -1,12 +1,19 @@
|
||||||
package eu.kanade.tachiyomi.extension.id.komikcast
|
package eu.kanade.tachiyomi.extension.id.komikcast
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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 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.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import eu.kanade.tachiyomi.source.model.*
|
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
class Komikcast : ParsedHttpSource() {
|
class Komikcast : ParsedHttpSource() {
|
||||||
|
|
||||||
|
@ -37,7 +44,7 @@ class Komikcast : ParsedHttpSource() {
|
||||||
url.toString()
|
url.toString()
|
||||||
} else {
|
} else {
|
||||||
val url = HttpUrl.parse("$baseUrl/daftar-komik/page/$page")!!.newBuilder()
|
val url = HttpUrl.parse("$baseUrl/daftar-komik/page/$page")!!.newBuilder()
|
||||||
var orderBy = ""
|
var orderBy: String
|
||||||
(if (filters.isEmpty()) getFilterList() else filters).forEach { filter ->
|
(if (filters.isEmpty()) getFilterList() else filters).forEach { filter ->
|
||||||
when (filter) {
|
when (filter) {
|
||||||
is Status -> url.addQueryParameter("status", arrayOf("", "ongoing", "completed")[filter.state])
|
is Status -> url.addQueryParameter("status", arrayOf("", "ongoing", "completed")[filter.state])
|
||||||
|
|
|
@ -2,16 +2,20 @@ package eu.kanade.tachiyomi.extension.id.komikindo
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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.source.online.ParsedHttpSource
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.Calendar
|
||||||
import okhttp3.Headers
|
import okhttp3.Headers
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
class KomikIndo : ParsedHttpSource() {
|
class KomikIndo : ParsedHttpSource() {
|
||||||
|
|
||||||
|
@ -81,17 +85,17 @@ class KomikIndo : ParsedHttpSource() {
|
||||||
override fun mangaDetailsParse(document: Document): SManga {
|
override fun mangaDetailsParse(document: Document): SManga {
|
||||||
val infoElm = document.select(".listinfo > ul > li")
|
val infoElm = document.select(".listinfo > ul > li")
|
||||||
val manga = SManga.create()
|
val manga = SManga.create()
|
||||||
infoElm.forEachIndexed { index, element ->
|
infoElm.forEach { element ->
|
||||||
val infoTitle = element.select("b").text().toLowerCase()
|
val infoTitle = element.select("b").text().toLowerCase()
|
||||||
var infoContent = element.text()
|
val infoContent = element.text()
|
||||||
when {
|
when {
|
||||||
infoTitle.contains("status") -> manga.status = parseStatus(infoContent)
|
infoTitle.contains("status") -> manga.status = parseStatus(infoContent)
|
||||||
infoTitle.contains("author") -> manga.author = infoContent
|
infoTitle.contains("author") -> manga.author = infoContent
|
||||||
infoTitle.contains("artist") -> manga.artist = infoContent
|
infoTitle.contains("artist") -> manga.artist = infoContent
|
||||||
infoTitle.contains("genres") -> {
|
infoTitle.contains("genres") -> {
|
||||||
val genres = mutableListOf<String>()
|
val genres = mutableListOf<String>()
|
||||||
element.select("a").forEach { element ->
|
element.select("a").forEach { a ->
|
||||||
val genre = element.text()
|
val genre = a.text()
|
||||||
genres.add(genre)
|
genres.add(genre)
|
||||||
}
|
}
|
||||||
manga.genre = genres.joinToString(", ")
|
manga.genre = genres.joinToString(", ")
|
||||||
|
|
|
@ -2,23 +2,16 @@ package eu.kanade.tachiyomi.extension.id.komiku
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.source.model.FilterList
|
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.Page
|
||||||
import eu.kanade.tachiyomi.source.model.SChapter
|
import eu.kanade.tachiyomi.source.model.SChapter
|
||||||
import eu.kanade.tachiyomi.source.model.SManga
|
import eu.kanade.tachiyomi.source.model.SManga
|
||||||
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
import java.util.Calendar
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
import okhttp3.Request
|
|
||||||
import okhttp3.Response
|
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
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() {
|
class Komiku : ParsedHttpSource() {
|
||||||
override val name = "Komiku"
|
override val name = "Komiku"
|
||||||
|
|
||||||
override val baseUrl = "https://komiku.co.id/"
|
override val baseUrl = "https://komiku.co.id/"
|
||||||
|
@ -65,7 +58,7 @@ class Komiku: ParsedHttpSource() {
|
||||||
}
|
}
|
||||||
thumbnail_url = document.select("div.ims > img").attr("src")
|
thumbnail_url = document.select("div.ims > img").attr("src")
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun parseStatus(status: String) = when {
|
private fun parseStatus(status: String) = when {
|
||||||
status.contains("Ongoing") -> SManga.ONGOING
|
status.contains("Ongoing") -> SManga.ONGOING
|
||||||
status.contains("Completed") -> SManga.COMPLETED
|
status.contains("Completed") -> SManga.COMPLETED
|
||||||
|
@ -80,11 +73,11 @@ class Komiku: ParsedHttpSource() {
|
||||||
setUrlWithoutDomain(element.select("a.popunder").attr("href"))
|
setUrlWithoutDomain(element.select("a.popunder").attr("href"))
|
||||||
name = element.select("a.popunder").attr("title")
|
name = element.select("a.popunder").attr("title")
|
||||||
|
|
||||||
//Has datetime attribute, but all are set to statt of current day for whatever reason, so parsing text instead
|
// Has datetime attribute, but all are set to statt of current day for whatever reason, so parsing text instead
|
||||||
date_upload = parseRelativeDate(element.select("time").text().trim()) ?: 0
|
date_upload = parseRelativeDate(element.select("time").text().trim()) ?: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
//Used Google translate here
|
// Used Google translate here
|
||||||
private fun parseRelativeDate(date: String): Long? {
|
private fun parseRelativeDate(date: String): Long? {
|
||||||
val trimmedDate = date.substringBefore(" lalu").removeSuffix("s").split(" ")
|
val trimmedDate = date.substringBefore(" lalu").removeSuffix("s").split(" ")
|
||||||
|
|
||||||
|
@ -110,5 +103,5 @@ class Komiku: ParsedHttpSource() {
|
||||||
|
|
||||||
override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException("Not Used")
|
override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException("Not Used")
|
||||||
|
|
||||||
override fun getFilterList() = FilterList()
|
override fun getFilterList() = FilterList()
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,14 @@
|
||||||
package eu.kanade.tachiyomi.extension.id.maidmanga
|
package eu.kanade.tachiyomi.extension.id.maidmanga
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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.source.online.ParsedHttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
import eu.kanade.tachiyomi.util.asJsoup
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
|
@ -11,7 +16,6 @@ import okhttp3.Response
|
||||||
import org.json.JSONObject
|
import org.json.JSONObject
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
|
|
||||||
class MaidManga : ParsedHttpSource() {
|
class MaidManga : ParsedHttpSource() {
|
||||||
|
|
||||||
|
@ -27,9 +31,9 @@ class MaidManga : ParsedHttpSource() {
|
||||||
|
|
||||||
override fun latestUpdatesSelector() = "h2:contains(Update Chapter) + div.row div.col-12"
|
override fun latestUpdatesSelector() = "h2:contains(Update Chapter) + div.row div.col-12"
|
||||||
|
|
||||||
override fun latestUpdatesRequest(page: Int): Request {
|
override fun latestUpdatesRequest(page: Int): Request {
|
||||||
// The site redirects page 1 -> url-without-page so we do this redirect early for optimization
|
// The site redirects page 1 -> url-without-page so we do this redirect early for optimization
|
||||||
val builtUrl = if(page == 1) baseUrl else "$baseUrl/page/$page/"
|
val builtUrl = if (page == 1) baseUrl else "$baseUrl/page/$page/"
|
||||||
return GET(builtUrl)
|
return GET(builtUrl)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,8 +49,8 @@ class MaidManga : ParsedHttpSource() {
|
||||||
|
|
||||||
override fun latestUpdatesNextPageSelector() = "a:containsOwn(Berikutnya)"
|
override fun latestUpdatesNextPageSelector() = "a:containsOwn(Berikutnya)"
|
||||||
|
|
||||||
override fun popularMangaRequest(page: Int): Request {
|
override fun popularMangaRequest(page: Int): Request {
|
||||||
val builtUrl = if(page == 1) "$baseUrl/advanced-search/?order=popular" else "$baseUrl/advanced-search/page/$page/?order=popular"
|
val builtUrl = if (page == 1) "$baseUrl/advanced-search/?order=popular" else "$baseUrl/advanced-search/page/$page/?order=popular"
|
||||||
return GET(builtUrl)
|
return GET(builtUrl)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +68,7 @@ class MaidManga : ParsedHttpSource() {
|
||||||
override fun popularMangaNextPageSelector() = latestUpdatesNextPageSelector()
|
override fun popularMangaNextPageSelector() = latestUpdatesNextPageSelector()
|
||||||
|
|
||||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
||||||
val builtUrl = if(page == 1) "$baseUrl/advanced-search/" else "$baseUrl/advanced-search/page/$page/"
|
val builtUrl = if (page == 1) "$baseUrl/advanced-search/" else "$baseUrl/advanced-search/page/$page/"
|
||||||
val url = HttpUrl.parse(builtUrl)!!.newBuilder()
|
val url = HttpUrl.parse(builtUrl)!!.newBuilder()
|
||||||
url.addQueryParameter("title", query)
|
url.addQueryParameter("title", query)
|
||||||
url.addQueryParameter("page", page.toString())
|
url.addQueryParameter("page", page.toString())
|
||||||
|
@ -166,8 +170,8 @@ class MaidManga : ParsedHttpSource() {
|
||||||
// Add date for latest chapter only
|
// Add date for latest chapter only
|
||||||
document.select("script.yoast-schema-graph").html()
|
document.select("script.yoast-schema-graph").html()
|
||||||
.let {
|
.let {
|
||||||
val date = JSONObject(it).getJSONArray("@graph").
|
val date = JSONObject(it).getJSONArray("@graph")
|
||||||
getJSONObject(3).getString("dateModified")
|
.getJSONObject(3).getString("dateModified")
|
||||||
chapters[0].date_upload = parseDate(date)
|
chapters[0].date_upload = parseDate(date)
|
||||||
}
|
}
|
||||||
return chapters
|
return chapters
|
||||||
|
@ -203,7 +207,7 @@ class MaidManga : ParsedHttpSource() {
|
||||||
return pages
|
return pages
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException("Not used")
|
override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException("Not used")
|
||||||
|
|
||||||
override fun getFilterList() = FilterList(
|
override fun getFilterList() = FilterList(
|
||||||
Filter.Header("You can combine filter."),
|
Filter.Header("You can combine filter."),
|
||||||
|
@ -244,7 +248,7 @@ class MaidManga : ParsedHttpSource() {
|
||||||
Tag("4-koma", "4-Koma"),
|
Tag("4-koma", "4-Koma"),
|
||||||
Tag("4-koma-comedy", "4-Koma Comedy"),
|
Tag("4-koma-comedy", "4-Koma Comedy"),
|
||||||
Tag("action", "Action"),
|
Tag("action", "Action"),
|
||||||
Tag("adult" ,"Adult"),
|
Tag("adult", "Adult"),
|
||||||
Tag("adventure", "Adventure"),
|
Tag("adventure", "Adventure"),
|
||||||
Tag("comedy", "Comedy"),
|
Tag("comedy", "Comedy"),
|
||||||
Tag("demons", "Demons"),
|
Tag("demons", "Demons"),
|
||||||
|
|
|
@ -6,16 +6,19 @@ import com.github.salomonbrys.kotson.int
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
||||||
import com.google.gson.JsonObject
|
import com.google.gson.JsonObject
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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.source.online.ParsedHttpSource
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.Locale
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.lang.Exception
|
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.Locale
|
|
||||||
|
|
||||||
class MangaIndo : ParsedHttpSource() {
|
class MangaIndo : ParsedHttpSource() {
|
||||||
|
|
||||||
|
@ -147,5 +150,4 @@ class MangaIndo : ParsedHttpSource() {
|
||||||
override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException("Not used")
|
override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException("Not used")
|
||||||
|
|
||||||
override fun getFilterList() = FilterList()
|
override fun getFilterList() = FilterList()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,11 @@ package eu.kanade.tachiyomi.extension.id.mangaku
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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.source.online.ParsedHttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
import eu.kanade.tachiyomi.util.asJsoup
|
||||||
import okhttp3.Headers
|
import okhttp3.Headers
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
package eu.kanade.tachiyomi.extension.id.mangakyo
|
package eu.kanade.tachiyomi.extension.id.mangakyo
|
||||||
|
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
import android.util.Log
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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 eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
|
@ -17,7 +19,7 @@ class Mangakyo : ParsedHttpSource() {
|
||||||
override val supportsLatest: Boolean = true
|
override val supportsLatest: Boolean = true
|
||||||
override val client: OkHttpClient = network.cloudflareClient
|
override val client: OkHttpClient = network.cloudflareClient
|
||||||
|
|
||||||
//Popular
|
// Popular
|
||||||
|
|
||||||
override fun popularMangaRequest(page: Int): Request {
|
override fun popularMangaRequest(page: Int): Request {
|
||||||
return GET("$baseUrl/advanced-search/page/$page/?title&author&status&order=popular", headers)
|
return GET("$baseUrl/advanced-search/page/$page/?title&author&status&order=popular", headers)
|
||||||
|
@ -30,7 +32,7 @@ class Mangakyo : ParsedHttpSource() {
|
||||||
thumbnail_url = element.select("img").attr("abs:src")
|
thumbnail_url = element.select("img").attr("abs:src")
|
||||||
}
|
}
|
||||||
|
|
||||||
//Latest
|
// Latest
|
||||||
|
|
||||||
override fun latestUpdatesRequest(page: Int): Request {
|
override fun latestUpdatesRequest(page: Int): Request {
|
||||||
return GET("$baseUrl/advanced-search/page/$page/?title=&author=&status=&order=update", headers)
|
return GET("$baseUrl/advanced-search/page/$page/?title=&author=&status=&order=update", headers)
|
||||||
|
@ -39,24 +41,24 @@ class Mangakyo : ParsedHttpSource() {
|
||||||
override fun latestUpdatesSelector(): String = popularMangaSelector()
|
override fun latestUpdatesSelector(): String = popularMangaSelector()
|
||||||
override fun latestUpdatesFromElement(element: Element): SManga = popularMangaFromElement(element)
|
override fun latestUpdatesFromElement(element: Element): SManga = popularMangaFromElement(element)
|
||||||
|
|
||||||
//Search
|
// Search
|
||||||
|
|
||||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
||||||
val uri = Uri.parse(baseUrl).buildUpon()
|
val uri = Uri.parse(baseUrl).buildUpon()
|
||||||
.appendPath("advanced-search")
|
.appendPath("advanced-search")
|
||||||
.appendPath("page")
|
.appendPath("page")
|
||||||
.appendPath(page.toString())
|
.appendPath(page.toString())
|
||||||
.appendQueryParameter("title",query)
|
.appendQueryParameter("title", query)
|
||||||
.appendQueryParameter("author","")
|
.appendQueryParameter("author", "")
|
||||||
.appendQueryParameter("status","")
|
.appendQueryParameter("status", "")
|
||||||
.appendQueryParameter("order","title")
|
.appendQueryParameter("order", "title")
|
||||||
return GET(uri.toString(), headers)
|
return GET(uri.toString(), headers)
|
||||||
}
|
}
|
||||||
override fun searchMangaNextPageSelector(): String? = popularMangaNextPageSelector()
|
override fun searchMangaNextPageSelector(): String? = popularMangaNextPageSelector()
|
||||||
override fun searchMangaSelector(): String = popularMangaSelector()
|
override fun searchMangaSelector(): String = popularMangaSelector()
|
||||||
override fun searchMangaFromElement(element: Element): SManga = popularMangaFromElement(element)
|
override fun searchMangaFromElement(element: Element): SManga = popularMangaFromElement(element)
|
||||||
|
|
||||||
//Details
|
// Details
|
||||||
|
|
||||||
override fun mangaDetailsParse(document: Document): SManga = SManga.create().apply {
|
override fun mangaDetailsParse(document: Document): SManga = SManga.create().apply {
|
||||||
title = document.select("h1[itemprop=headline]").text()
|
title = document.select("h1[itemprop=headline]").text()
|
||||||
|
@ -73,7 +75,7 @@ class Mangakyo : ParsedHttpSource() {
|
||||||
description = document.select("span.desc p").map { it.text() }.joinToString("\n")
|
description = document.select("span.desc p").map { it.text() }.joinToString("\n")
|
||||||
}
|
}
|
||||||
|
|
||||||
//Chapter
|
// Chapter
|
||||||
|
|
||||||
override fun chapterListSelector(): String = "span.lchx a"
|
override fun chapterListSelector(): String = "span.lchx a"
|
||||||
override fun chapterFromElement(element: Element): SChapter = SChapter.create().apply {
|
override fun chapterFromElement(element: Element): SChapter = SChapter.create().apply {
|
||||||
|
@ -81,11 +83,11 @@ class Mangakyo : ParsedHttpSource() {
|
||||||
setUrlWithoutDomain(element.attr("abs:href"))
|
setUrlWithoutDomain(element.attr("abs:href"))
|
||||||
}
|
}
|
||||||
|
|
||||||
//Pages
|
// Pages
|
||||||
|
|
||||||
override fun pageListParse(document: Document): List<Page> = mutableListOf<Page>().apply {
|
override fun pageListParse(document: Document): List<Page> = mutableListOf<Page>().apply {
|
||||||
document.select("img.alignnone").forEachIndexed { index, element ->
|
document.select("img.alignnone").forEachIndexed { index, element ->
|
||||||
add(Page(index,"",element.attr("abs:src")))
|
add(Page(index, "", element.attr("abs:src")))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
override fun imageUrlParse(document: Document): String = throw Exception("Not Used")
|
override fun imageUrlParse(document: Document): String = throw Exception("Not Used")
|
||||||
|
|
|
@ -1,14 +1,18 @@
|
||||||
package eu.kanade.tachiyomi.extension.id.mangashiro
|
package eu.kanade.tachiyomi.extension.id.mangashiro
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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 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.Document
|
||||||
import org.jsoup.nodes.Element
|
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() {
|
class Mangashiro : ParsedHttpSource() {
|
||||||
|
|
||||||
|
@ -32,7 +36,7 @@ class Mangashiro : ParsedHttpSource() {
|
||||||
|
|
||||||
override fun popularMangaFromElement(element: Element): SManga = searchMangaFromElement(element)
|
override fun popularMangaFromElement(element: Element): SManga = searchMangaFromElement(element)
|
||||||
override fun latestUpdatesFromElement(element: Element): SManga = searchMangaFromElement(element)
|
override fun latestUpdatesFromElement(element: Element): SManga = searchMangaFromElement(element)
|
||||||
|
|
||||||
override fun popularMangaNextPageSelector() = "a.next.page-numbers"
|
override fun popularMangaNextPageSelector() = "a.next.page-numbers"
|
||||||
override fun latestUpdatesNextPageSelector() = popularMangaNextPageSelector()
|
override fun latestUpdatesNextPageSelector() = popularMangaNextPageSelector()
|
||||||
override fun searchMangaNextPageSelector() = popularMangaNextPageSelector()
|
override fun searchMangaNextPageSelector() = popularMangaNextPageSelector()
|
||||||
|
@ -261,6 +265,4 @@ class Mangashiro : ParsedHttpSource() {
|
||||||
Filter.Select<String>(displayName, vals.map { it.first }.toTypedArray()) {
|
Filter.Select<String>(displayName, vals.map { it.first }.toTypedArray()) {
|
||||||
fun toUriPart() = vals[state].second
|
fun toUriPart() = vals[state].second
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,22 +2,15 @@ package eu.kanade.tachiyomi.extension.id.manhuaid
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.source.model.FilterList
|
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.Page
|
||||||
import eu.kanade.tachiyomi.source.model.SChapter
|
import eu.kanade.tachiyomi.source.model.SChapter
|
||||||
import eu.kanade.tachiyomi.source.model.SManga
|
import eu.kanade.tachiyomi.source.model.SManga
|
||||||
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
import okhttp3.Request
|
|
||||||
import okhttp3.Response
|
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
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() {
|
class ManhuaID : ParsedHttpSource() {
|
||||||
|
|
||||||
override val name = "ManhuaID"
|
override val name = "ManhuaID"
|
||||||
|
|
||||||
|
@ -56,7 +49,7 @@ class ManhuaID: ParsedHttpSource() {
|
||||||
override fun searchMangaFromElement(element: Element) = popularMangaFromElement(element)
|
override fun searchMangaFromElement(element: Element) = popularMangaFromElement(element)
|
||||||
|
|
||||||
override fun searchMangaNextPageSelector(): String? = null
|
override fun searchMangaNextPageSelector(): String? = null
|
||||||
|
|
||||||
override fun mangaDetailsRequest(manga: SManga) = GET(baseUrl + manga.url, headers)
|
override fun mangaDetailsRequest(manga: SManga) = GET(baseUrl + manga.url, headers)
|
||||||
|
|
||||||
override fun mangaDetailsParse(document: Document) = SManga.create().apply {
|
override fun mangaDetailsParse(document: Document) = SManga.create().apply {
|
||||||
|
@ -65,8 +58,8 @@ class ManhuaID: ParsedHttpSource() {
|
||||||
description = document.select(".text-justify").text()
|
description = document.select(".text-justify").text()
|
||||||
genre = document.select("span.badge.badge-success.mr-1.mb-1").joinToString { it.text() }
|
genre = document.select("span.badge.badge-success.mr-1.mb-1").joinToString { it.text() }
|
||||||
status = document.select("td > span.badge.badge-success").text().let {
|
status = document.select("td > span.badge.badge-success").text().let {
|
||||||
parseStatus(it)
|
parseStatus(it)
|
||||||
}
|
}
|
||||||
thumbnail_url = document.select("img.img-fluid").attr("abs:src")
|
thumbnail_url = document.select("img.img-fluid").attr("abs:src")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,5 +86,5 @@ class ManhuaID: ParsedHttpSource() {
|
||||||
|
|
||||||
override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException("Not Used")
|
override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException("Not Used")
|
||||||
|
|
||||||
override fun getFilterList() = FilterList()
|
override fun getFilterList() = FilterList()
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +1,21 @@
|
||||||
package eu.kanade.tachiyomi.extension.id.neumanga
|
package eu.kanade.tachiyomi.extension.id.neumanga
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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.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.HttpUrl
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import org.json.JSONArray
|
import org.json.JSONArray
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
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() {
|
class Neumanga : ParsedHttpSource() {
|
||||||
|
|
||||||
|
@ -95,7 +99,7 @@ class Neumanga : ParsedHttpSource() {
|
||||||
filter.state.forEach {
|
filter.state.forEach {
|
||||||
if (it.state == 1) {
|
if (it.state == 1) {
|
||||||
genreInclude.add(it.id)
|
genreInclude.add(it.id)
|
||||||
} else if (it.state == 2){
|
} else if (it.state == 2) {
|
||||||
genreExclude.add(it.id)
|
genreExclude.add(it.id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -244,5 +248,4 @@ class Neumanga : ParsedHttpSource() {
|
||||||
Genre("Echi", "Echi"),
|
Genre("Echi", "Echi"),
|
||||||
Genre("4-Koma", "4-Koma")
|
Genre("4-Koma", "4-Koma")
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,23 +2,15 @@ package eu.kanade.tachiyomi.extension.id.ngomik
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.source.model.FilterList
|
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.Page
|
||||||
import eu.kanade.tachiyomi.source.model.SChapter
|
import eu.kanade.tachiyomi.source.model.SChapter
|
||||||
import eu.kanade.tachiyomi.source.model.SManga
|
import eu.kanade.tachiyomi.source.model.SManga
|
||||||
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
import okhttp3.Request
|
|
||||||
import okhttp3.Response
|
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
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() {
|
class Ngomik : ParsedHttpSource() {
|
||||||
|
|
||||||
override val name = "Ngomik"
|
override val name = "Ngomik"
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,20 @@
|
||||||
package eu.kanade.tachiyomi.extension.id.pecintakomik
|
package eu.kanade.tachiyomi.extension.id.pecintakomik
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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.source.online.ParsedHttpSource
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.Locale
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import org.jsoup.Jsoup
|
import org.jsoup.Jsoup
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
class PecintaKomik : ParsedHttpSource() {
|
class PecintaKomik : ParsedHttpSource() {
|
||||||
|
|
||||||
|
@ -24,9 +28,9 @@ class PecintaKomik : ParsedHttpSource() {
|
||||||
|
|
||||||
override val client: OkHttpClient = network.cloudflareClient
|
override val client: OkHttpClient = network.cloudflareClient
|
||||||
|
|
||||||
override fun latestUpdatesRequest(page: Int): Request {
|
override fun latestUpdatesRequest(page: Int): Request {
|
||||||
// The site redirects page 1 -> url-without-page so we do this redirect early for optimization
|
// The site redirects page 1 -> url-without-page so we do this redirect early for optimization
|
||||||
val builtUrl = if(page == 1) baseUrl else "$baseUrl/page/$page/"
|
val builtUrl = if (page == 1) baseUrl else "$baseUrl/page/$page/"
|
||||||
return GET(builtUrl)
|
return GET(builtUrl)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,8 +48,8 @@ class PecintaKomik : ParsedHttpSource() {
|
||||||
|
|
||||||
override fun latestUpdatesNextPageSelector() = "a.next"
|
override fun latestUpdatesNextPageSelector() = "a.next"
|
||||||
|
|
||||||
override fun popularMangaRequest(page: Int): Request {
|
override fun popularMangaRequest(page: Int): Request {
|
||||||
val builtUrl = if(page == 1) "$baseUrl/advanced-search/?order=popular" else "$baseUrl/advanced-search/page/$page/?order=popular"
|
val builtUrl = if (page == 1) "$baseUrl/advanced-search/?order=popular" else "$baseUrl/advanced-search/page/$page/?order=popular"
|
||||||
return GET(builtUrl)
|
return GET(builtUrl)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,7 +67,7 @@ class PecintaKomik : ParsedHttpSource() {
|
||||||
override fun popularMangaNextPageSelector() = latestUpdatesNextPageSelector()
|
override fun popularMangaNextPageSelector() = latestUpdatesNextPageSelector()
|
||||||
|
|
||||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
||||||
val builtUrl = if(page == 1) "$baseUrl/advanced-search/" else "$baseUrl/advanced-search/page/$page/"
|
val builtUrl = if (page == 1) "$baseUrl/advanced-search/" else "$baseUrl/advanced-search/page/$page/"
|
||||||
var types: String? = null
|
var types: String? = null
|
||||||
fun requireNoType() = require(types == null) {
|
fun requireNoType() = require(types == null) {
|
||||||
"You cannot combine type with other filters!"
|
"You cannot combine type with other filters!"
|
||||||
|
@ -74,13 +78,13 @@ class PecintaKomik : ParsedHttpSource() {
|
||||||
filters.forEach { filter ->
|
filters.forEach { filter ->
|
||||||
when (filter) {
|
when (filter) {
|
||||||
is AuthorFilter -> {
|
is AuthorFilter -> {
|
||||||
if(filter.state.isNotBlank()) {
|
if (filter.state.isNotBlank()) {
|
||||||
requireNoType()
|
requireNoType()
|
||||||
url.addQueryParameter("author", filter.state)
|
url.addQueryParameter("author", filter.state)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
is YearFilter -> {
|
is YearFilter -> {
|
||||||
if(filter.state.isNotBlank()) {
|
if (filter.state.isNotBlank()) {
|
||||||
requireNoType()
|
requireNoType()
|
||||||
url.addQueryParameter("yearx", filter.state)
|
url.addQueryParameter("yearx", filter.state)
|
||||||
}
|
}
|
||||||
|
@ -91,18 +95,18 @@ class PecintaKomik : ParsedHttpSource() {
|
||||||
Filter.TriState.STATE_EXCLUDE -> "ongoing"
|
Filter.TriState.STATE_EXCLUDE -> "ongoing"
|
||||||
else -> ""
|
else -> ""
|
||||||
}
|
}
|
||||||
if(status.isNotEmpty()) {
|
if (status.isNotEmpty()) {
|
||||||
requireNoType()
|
requireNoType()
|
||||||
url.addQueryParameter("status", status)
|
url.addQueryParameter("status", status)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
is TypeFilter -> {
|
is TypeFilter -> {
|
||||||
if(filter.state != 0) {
|
if (filter.state != 0) {
|
||||||
types = if(page == 1) "$baseUrl/types/${filter.toUriPart()}/" else "$baseUrl/types/${filter.toUriPart()}/page/$page/"
|
types = if (page == 1) "$baseUrl/types/${filter.toUriPart()}/" else "$baseUrl/types/${filter.toUriPart()}/page/$page/"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
is OrderByFilter -> {
|
is OrderByFilter -> {
|
||||||
if(filter.state != 0) {
|
if (filter.state != 0) {
|
||||||
requireNoType()
|
requireNoType()
|
||||||
url.addQueryParameter("order", filter.toUriPart())
|
url.addQueryParameter("order", filter.toUriPart())
|
||||||
}
|
}
|
||||||
|
@ -212,7 +216,7 @@ class PecintaKomik : ParsedHttpSource() {
|
||||||
return pages
|
return pages
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException("Not used")
|
override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException("Not used")
|
||||||
|
|
||||||
override fun getFilterList() = FilterList(
|
override fun getFilterList() = FilterList(
|
||||||
Filter.Header("Type filter cannot be combined."),
|
Filter.Header("Type filter cannot be combined."),
|
||||||
|
|
|
@ -2,15 +2,22 @@ package eu.kanade.tachiyomi.extension.it.hentaifantasy
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.network.POST
|
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 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.ParseException
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
import java.util.Calendar
|
import java.util.Calendar
|
||||||
import java.util.regex.Pattern
|
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() {
|
class HentaiFantasy : ParsedHttpSource() {
|
||||||
override val name = "HentaiFantasy"
|
override val name = "HentaiFantasy"
|
||||||
|
@ -35,8 +42,8 @@ class HentaiFantasy : ParsedHttpSource() {
|
||||||
|
|
||||||
override fun popularMangaSelector() = "div.list > div.group > div.title > a"
|
override fun popularMangaSelector() = "div.list > div.group > div.title > a"
|
||||||
|
|
||||||
override fun popularMangaRequest(page: Int)
|
override fun popularMangaRequest(page: Int) =
|
||||||
= GET("$baseUrl/most_downloaded/$page/", headers)
|
GET("$baseUrl/most_downloaded/$page/", headers)
|
||||||
|
|
||||||
override fun popularMangaFromElement(element: Element): SManga {
|
override fun popularMangaFromElement(element: Element): SManga {
|
||||||
val manga = SManga.create()
|
val manga = SManga.create()
|
||||||
|
@ -49,8 +56,8 @@ class HentaiFantasy : ParsedHttpSource() {
|
||||||
|
|
||||||
override fun latestUpdatesSelector() = popularMangaSelector()
|
override fun latestUpdatesSelector() = popularMangaSelector()
|
||||||
|
|
||||||
override fun latestUpdatesRequest(page: Int)
|
override fun latestUpdatesRequest(page: Int) =
|
||||||
= GET("$baseUrl/latest/$page/", headers)
|
GET("$baseUrl/latest/$page/", headers)
|
||||||
|
|
||||||
override fun latestUpdatesFromElement(element: Element): SManga {
|
override fun latestUpdatesFromElement(element: Element): SManga {
|
||||||
return popularMangaFromElement(element)
|
return popularMangaFromElement(element)
|
||||||
|
@ -68,7 +75,7 @@ class HentaiFantasy : ParsedHttpSource() {
|
||||||
is TagList -> filter.state
|
is TagList -> filter.state
|
||||||
.filter { it.state }
|
.filter { it.state }
|
||||||
.map {
|
.map {
|
||||||
paths.add(it.name.toLowerCase().replace(" ", "_"));
|
paths.add(it.name.toLowerCase().replace(" ", "_"))
|
||||||
it.id.toString()
|
it.id.toString()
|
||||||
}
|
}
|
||||||
.forEach { tags.add(it) }
|
.forEach { tags.add(it) }
|
||||||
|
@ -93,12 +100,12 @@ class HentaiFantasy : ParsedHttpSource() {
|
||||||
var searchPath = if (!searchTags) {
|
var searchPath = if (!searchTags) {
|
||||||
"search"
|
"search"
|
||||||
} else if (paths.size == 1) {
|
} else if (paths.size == 1) {
|
||||||
"tag/${paths[0]}/${page}"
|
"tag/${paths[0]}/$page"
|
||||||
} else {
|
} else {
|
||||||
"search_tags"
|
"search_tags"
|
||||||
}
|
}
|
||||||
|
|
||||||
return POST("${baseUrl}/${searchPath}", headers, form.build())
|
return POST("$baseUrl/$searchPath", headers, form.build())
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun searchMangaFromElement(element: Element): SManga {
|
override fun searchMangaFromElement(element: Element): SManga {
|
||||||
|
|
|
@ -5,7 +5,11 @@ import com.github.salomonbrys.kotson.get
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
||||||
import com.google.gson.JsonObject
|
import com.google.gson.JsonObject
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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.source.online.ParsedHttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
import eu.kanade.tachiyomi.util.asJsoup
|
||||||
import okhttp3.Headers
|
import okhttp3.Headers
|
||||||
|
@ -143,5 +147,4 @@ class ItaScan : ParsedHttpSource() {
|
||||||
override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException("Not used")
|
override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException("Not used")
|
||||||
|
|
||||||
override fun getFilterList() = FilterList()
|
override fun getFilterList() = FilterList()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,20 @@
|
||||||
package eu.kanade.tachiyomi.extension.it.mangaeden
|
package eu.kanade.tachiyomi.extension.it.mangaeden
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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.source.online.ParsedHttpSource
|
||||||
|
import java.text.ParseException
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.Calendar
|
||||||
|
import java.util.Locale
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.text.ParseException
|
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
class Mangaeden : ParsedHttpSource() {
|
class Mangaeden : ParsedHttpSource() {
|
||||||
|
|
||||||
|
|
|
@ -13,13 +13,13 @@ import org.jsoup.nodes.Element
|
||||||
|
|
||||||
class NovelleLeggere : ParsedHttpSource() {
|
class NovelleLeggere : ParsedHttpSource() {
|
||||||
|
|
||||||
//Info
|
// Info
|
||||||
override val name: String = "Novelle Leggere"
|
override val name: String = "Novelle Leggere"
|
||||||
override val baseUrl: String = "https://www.novelleleggere.com"
|
override val baseUrl: String = "https://www.novelleleggere.com"
|
||||||
override val lang: String = "it"
|
override val lang: String = "it"
|
||||||
override val supportsLatest: Boolean = false
|
override val supportsLatest: Boolean = false
|
||||||
|
|
||||||
//Popular
|
// Popular
|
||||||
override fun popularMangaRequest(page: Int): Request = GET(baseUrl)
|
override fun popularMangaRequest(page: Int): Request = GET(baseUrl)
|
||||||
|
|
||||||
override fun popularMangaNextPageSelector(): String? = null
|
override fun popularMangaNextPageSelector(): String? = null
|
||||||
|
@ -30,7 +30,7 @@ class NovelleLeggere : ParsedHttpSource() {
|
||||||
setUrlWithoutDomain(a.attr("abs:href"))
|
setUrlWithoutDomain(a.attr("abs:href"))
|
||||||
}
|
}
|
||||||
|
|
||||||
//Latest
|
// Latest
|
||||||
override fun latestUpdatesRequest(page: Int): Request = throw Exception("Latest Not Supported")
|
override fun latestUpdatesRequest(page: Int): Request = throw Exception("Latest Not Supported")
|
||||||
|
|
||||||
override fun latestUpdatesNextPageSelector(): String? = throw Exception("Latest Not Supported")
|
override fun latestUpdatesNextPageSelector(): String? = throw Exception("Latest Not Supported")
|
||||||
|
@ -38,7 +38,7 @@ class NovelleLeggere : ParsedHttpSource() {
|
||||||
override fun latestUpdatesFromElement(element: Element): SManga =
|
override fun latestUpdatesFromElement(element: Element): SManga =
|
||||||
throw Exception("Latest Not Supported")
|
throw Exception("Latest Not Supported")
|
||||||
|
|
||||||
//Search
|
// Search
|
||||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request =
|
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request =
|
||||||
throw Exception("Search Not Supported")
|
throw Exception("Search Not Supported")
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ class NovelleLeggere : ParsedHttpSource() {
|
||||||
override fun searchMangaFromElement(element: Element): SManga =
|
override fun searchMangaFromElement(element: Element): SManga =
|
||||||
throw Exception("Search Not Supported")
|
throw Exception("Search Not Supported")
|
||||||
|
|
||||||
//Details
|
// Details
|
||||||
override fun mangaDetailsParse(document: Document): SManga = SManga.create().apply {
|
override fun mangaDetailsParse(document: Document): SManga = SManga.create().apply {
|
||||||
thumbnail_url = document.select("div.post-content img").first().attr("abs:src")
|
thumbnail_url = document.select("div.post-content img").first().attr("abs:src")
|
||||||
title = document.select("div.post-content h3").text().trim()
|
title = document.select("div.post-content h3").text().trim()
|
||||||
|
@ -56,7 +56,7 @@ class NovelleLeggere : ParsedHttpSource() {
|
||||||
.trim()
|
.trim()
|
||||||
}
|
}
|
||||||
|
|
||||||
//Chapters
|
// Chapters
|
||||||
override fun chapterListSelector(): String =
|
override fun chapterListSelector(): String =
|
||||||
"div.post-content div:contains(Capitoli) div.su-spoiler-content ul li a"
|
"div.post-content div:contains(Capitoli) div.su-spoiler-content ul li a"
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ class NovelleLeggere : ParsedHttpSource() {
|
||||||
return super.chapterListParse(response).reversed()
|
return super.chapterListParse(response).reversed()
|
||||||
}
|
}
|
||||||
|
|
||||||
//Pages
|
// Pages
|
||||||
override fun pageListParse(document: Document): List<Page> = mutableListOf<Page>().apply {
|
override fun pageListParse(document: Document): List<Page> = mutableListOf<Page>().apply {
|
||||||
document.select("div.post-content p img").forEachIndexed { index, element ->
|
document.select("div.post-content p img").forEachIndexed { index, element ->
|
||||||
add(Page(index, "", element.attr("abs:src").substringBefore("?")))
|
add(Page(index, "", element.attr("abs:src").substringBefore("?")))
|
||||||
|
@ -78,5 +78,4 @@ class NovelleLeggere : ParsedHttpSource() {
|
||||||
|
|
||||||
override fun imageUrlParse(document: Document): String =
|
override fun imageUrlParse(document: Document): String =
|
||||||
throw Exception("ImgURL Parse Not Used")
|
throw Exception("ImgURL Parse Not Used")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,20 @@
|
||||||
package eu.kanade.tachiyomi.extension.it.perveden
|
package eu.kanade.tachiyomi.extension.it.perveden
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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.source.online.ParsedHttpSource
|
||||||
|
import java.text.ParseException
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.Calendar
|
||||||
|
import java.util.Locale
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.text.ParseException
|
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
class Perveden : ParsedHttpSource() {
|
class Perveden : ParsedHttpSource() {
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,15 @@
|
||||||
package eu.kanade.tachiyomi.extension.ja.nikkangecchan
|
package eu.kanade.tachiyomi.extension.ja.nikkangecchan
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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.source.online.ParsedHttpSource
|
||||||
import okhttp3.*
|
import okhttp3.Headers
|
||||||
|
import okhttp3.Request
|
||||||
|
import okhttp3.Response
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import rx.Observable
|
import rx.Observable
|
||||||
|
@ -45,14 +51,14 @@ class Nikkangecchan : ParsedHttpSource() {
|
||||||
override fun fetchSearchManga(page: Int, query: String, filters: FilterList): Observable<MangasPage> {
|
override fun fetchSearchManga(page: Int, query: String, filters: FilterList): Observable<MangasPage> {
|
||||||
return super.fetchSearchManga(page, query, filters)
|
return super.fetchSearchManga(page, query, filters)
|
||||||
.map {
|
.map {
|
||||||
val filtered = it.mangas.filter{ e -> e.title.contains(query, true) }
|
val filtered = it.mangas.filter { e -> e.title.contains(query, true) }
|
||||||
MangasPage(filtered, false)
|
MangasPage(filtered, false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Does not have search, use complete list (in popular) instead.
|
// Does not have search, use complete list (in popular) instead.
|
||||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request
|
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request =
|
||||||
= popularMangaRequest(page)
|
popularMangaRequest(page)
|
||||||
|
|
||||||
override fun searchMangaSelector() = popularMangaSelector()
|
override fun searchMangaSelector() = popularMangaSelector()
|
||||||
|
|
||||||
|
@ -74,8 +80,8 @@ class Nikkangecchan : ParsedHttpSource() {
|
||||||
|
|
||||||
override fun chapterListSelector(): String = ".episodeBox"
|
override fun chapterListSelector(): String = ".episodeBox"
|
||||||
|
|
||||||
override fun chapterListParse(response: Response): List<SChapter>
|
override fun chapterListParse(response: Response): List<SChapter> =
|
||||||
= super.chapterListParse(response).reversed()
|
super.chapterListParse(response).reversed()
|
||||||
|
|
||||||
override fun chapterFromElement(element: Element): SChapter {
|
override fun chapterFromElement(element: Element): SChapter {
|
||||||
val episodePage = element.select(".episode-page").first()
|
val episodePage = element.select(".episode-page").first()
|
||||||
|
|
|
@ -1,14 +1,22 @@
|
||||||
package eu.kanade.tachiyomi.extension.ja.rawdevart
|
package eu.kanade.tachiyomi.extension.ja.rawdevart
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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.source.online.ParsedHttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
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.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
class Rawdevart : ParsedHttpSource() {
|
class Rawdevart : ParsedHttpSource() {
|
||||||
|
|
||||||
|
@ -152,7 +160,7 @@ class Rawdevart : ParsedHttpSource() {
|
||||||
manga.genre = genres.joinToString(", ")
|
manga.genre = genres.joinToString(", ")
|
||||||
manga.description = infoElement.select("div.description").text()
|
manga.description = infoElement.select("div.description").text()
|
||||||
.substringAfter("Description ")
|
.substringAfter("Description ")
|
||||||
manga.thumbnail_url =infoElement.select("img.img-fluid.not-lazy").attr("abs:src")
|
manga.thumbnail_url = infoElement.select("img.img-fluid.not-lazy").attr("abs:src")
|
||||||
|
|
||||||
return manga
|
return manga
|
||||||
}
|
}
|
||||||
|
@ -217,7 +225,7 @@ class Rawdevart : ParsedHttpSource() {
|
||||||
return pages
|
return pages
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException("Not used")
|
override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException("Not used")
|
||||||
|
|
||||||
private class AuthorFilter : Filter.Text("Author")
|
private class AuthorFilter : Filter.Text("Author")
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,24 @@
|
||||||
package eu.kanade.tachiyomi.extension.ja.rawkuma
|
package eu.kanade.tachiyomi.extension.ja.rawkuma
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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.source.online.ParsedHttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
import eu.kanade.tachiyomi.util.asJsoup
|
||||||
|
import java.text.ParseException
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.Locale
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.text.ParseException
|
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.Locale
|
|
||||||
|
|
||||||
class Rawkuma: ParsedHttpSource() {
|
class Rawkuma : ParsedHttpSource() {
|
||||||
|
|
||||||
override val name = "Rawkuma"
|
override val name = "Rawkuma"
|
||||||
|
|
||||||
|
@ -28,9 +32,9 @@ class Rawkuma: ParsedHttpSource() {
|
||||||
|
|
||||||
override fun latestUpdatesSelector() = "div.bsx a"
|
override fun latestUpdatesSelector() = "div.bsx a"
|
||||||
|
|
||||||
override fun latestUpdatesRequest(page: Int): Request {
|
override fun latestUpdatesRequest(page: Int): Request {
|
||||||
// The site redirects page 1 -> url-without-page so we do this redirect early for optimization
|
// The site redirects page 1 -> url-without-page so we do this redirect early for optimization
|
||||||
val builtUrl = if(page == 1) "$baseUrl/manga/?order=update" else "$baseUrl/manga/page/$page/?order=update"
|
val builtUrl = if (page == 1) "$baseUrl/manga/?order=update" else "$baseUrl/manga/page/$page/?order=update"
|
||||||
return GET(builtUrl)
|
return GET(builtUrl)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,8 +49,8 @@ class Rawkuma: ParsedHttpSource() {
|
||||||
|
|
||||||
override fun latestUpdatesNextPageSelector() = "a.next"
|
override fun latestUpdatesNextPageSelector() = "a.next"
|
||||||
|
|
||||||
override fun popularMangaRequest(page: Int): Request {
|
override fun popularMangaRequest(page: Int): Request {
|
||||||
val builtUrl = if(page == 1) "$baseUrl/manga/?order=popular" else "$baseUrl/manga/page/$page/?order=popular"
|
val builtUrl = if (page == 1) "$baseUrl/manga/?order=popular" else "$baseUrl/manga/page/$page/?order=popular"
|
||||||
return GET(builtUrl)
|
return GET(builtUrl)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +61,7 @@ class Rawkuma: ParsedHttpSource() {
|
||||||
override fun popularMangaNextPageSelector() = latestUpdatesNextPageSelector()
|
override fun popularMangaNextPageSelector() = latestUpdatesNextPageSelector()
|
||||||
|
|
||||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
||||||
val builtUrl = if(page == 1) "$baseUrl/manga/" else "$baseUrl/manga/page/$page/"
|
val builtUrl = if (page == 1) "$baseUrl/manga/" else "$baseUrl/manga/page/$page/"
|
||||||
val url = HttpUrl.parse(builtUrl)!!.newBuilder()
|
val url = HttpUrl.parse(builtUrl)!!.newBuilder()
|
||||||
url.addQueryParameter("title", query)
|
url.addQueryParameter("title", query)
|
||||||
url.addQueryParameter("page", page.toString())
|
url.addQueryParameter("page", page.toString())
|
||||||
|
@ -197,7 +201,7 @@ class Rawkuma: ParsedHttpSource() {
|
||||||
return pages
|
return pages
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException("Not used")
|
override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException("Not used")
|
||||||
|
|
||||||
override fun getFilterList() = FilterList(
|
override fun getFilterList() = FilterList(
|
||||||
Filter.Header("You can combine filter."),
|
Filter.Header("You can combine filter."),
|
||||||
|
|
|
@ -2,13 +2,17 @@ package eu.kanade.tachiyomi.extension.ja.senmanga
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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.source.online.ParsedHttpSource
|
||||||
|
import java.util.Calendar
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.util.Calendar
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sen Manga source
|
* Sen Manga source
|
||||||
|
@ -23,8 +27,8 @@ class SenManga : ParsedHttpSource() {
|
||||||
|
|
||||||
@SuppressLint("DefaultLocale")
|
@SuppressLint("DefaultLocale")
|
||||||
override val client = super.client.newBuilder().addInterceptor {
|
override val client = super.client.newBuilder().addInterceptor {
|
||||||
//Intercept any image requests and add a referer to them
|
// Intercept any image requests and add a referer to them
|
||||||
//Enables bandwidth stealing feature
|
// Enables bandwidth stealing feature
|
||||||
val request = if (it.request().url().pathSegments().firstOrNull()?.trim()?.toLowerCase() == "viewer") {
|
val request = if (it.request().url().pathSegments().firstOrNull()?.trim()?.toLowerCase() == "viewer") {
|
||||||
it.request().newBuilder()
|
it.request().newBuilder()
|
||||||
.addHeader("Referer", it.request().url().newBuilder()
|
.addHeader("Referer", it.request().url().newBuilder()
|
||||||
|
@ -129,11 +133,11 @@ class SenManga : ParsedHttpSource() {
|
||||||
if (trimmedDate[2] != "ago") return 0
|
if (trimmedDate[2] != "ago") return 0
|
||||||
|
|
||||||
val number = trimmedDate[0].toIntOrNull() ?: return 0
|
val number = trimmedDate[0].toIntOrNull() ?: return 0
|
||||||
val unit = trimmedDate[1].removeSuffix("s") //Remove 's' suffix
|
val unit = trimmedDate[1].removeSuffix("s") // Remove 's' suffix
|
||||||
|
|
||||||
val now = Calendar.getInstance()
|
val now = Calendar.getInstance()
|
||||||
|
|
||||||
//Map English unit to Java unit
|
// Map English unit to Java unit
|
||||||
val javaUnit = when (unit) {
|
val javaUnit = when (unit) {
|
||||||
"year" -> Calendar.YEAR
|
"year" -> Calendar.YEAR
|
||||||
"month" -> Calendar.MONTH
|
"month" -> Calendar.MONTH
|
||||||
|
@ -151,13 +155,13 @@ class SenManga : ParsedHttpSource() {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun pageListParse(document: Document): List<Page> {
|
override fun pageListParse(document: Document): List<Page> {
|
||||||
return listOf(1 .. document.select("select[name=page] option:last-of-type").first().text().toInt()).flatten().map { i ->
|
return listOf(1..document.select("select[name=page] option:last-of-type").first().text().toInt()).flatten().map { i ->
|
||||||
Page(i - 1, "", "${document.location().replace(baseUrl, "$baseUrl/viewer")}/$i")
|
Page(i - 1, "", "${document.location().replace(baseUrl, "$baseUrl/viewer")}/$i")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun imageUrlParse(document: Document)
|
override fun imageUrlParse(document: Document) =
|
||||||
= throw UnsupportedOperationException("This method should not be called!")
|
throw UnsupportedOperationException("This method should not be called!")
|
||||||
|
|
||||||
override fun getFilterList() = FilterList(
|
override fun getFilterList() = FilterList(
|
||||||
GenreFilter(getGenreList()),
|
GenreFilter(getGenreList()),
|
||||||
|
|
|
@ -10,20 +10,32 @@ import com.github.salomonbrys.kotson.string
|
||||||
import com.google.gson.JsonObject
|
import com.google.gson.JsonObject
|
||||||
import com.google.gson.JsonParser
|
import com.google.gson.JsonParser
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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.source.online.ParsedHttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
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.Jsoup
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
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() {
|
class ShonenJumpPlus : ParsedHttpSource() {
|
||||||
|
|
||||||
|
@ -239,7 +251,7 @@ class ShonenJumpPlus : ParsedHttpSource() {
|
||||||
return output.toByteArray()
|
return output.toByteArray()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun parseChapterDate(date: String) : Long {
|
private fun parseChapterDate(date: String): Long {
|
||||||
return try {
|
return try {
|
||||||
DATE_PARSER.parse(date).time
|
DATE_PARSER.parse(date).time
|
||||||
} catch (e: ParseException) {
|
} catch (e: ParseException) {
|
||||||
|
|
|
@ -1,16 +1,20 @@
|
||||||
package eu.kanade.tachiyomi.extension.ko.jmana
|
package eu.kanade.tachiyomi.extension.ko.jmana
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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.source.online.ParsedHttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
import eu.kanade.tachiyomi.util.asJsoup
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.Locale
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* JMana Source
|
* JMana Source
|
||||||
|
@ -157,7 +161,7 @@ class JMana : ParsedHttpSource() {
|
||||||
|
|
||||||
override fun latestUpdatesNextPageSelector() = null
|
override fun latestUpdatesNextPageSelector() = null
|
||||||
|
|
||||||
//We are able to get the image URL directly from the page list
|
// 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!")
|
override fun imageUrlParse(document: Document) = throw UnsupportedOperationException("This method should not be called!")
|
||||||
|
|
||||||
override fun getFilterList() = FilterList()
|
override fun getFilterList() = FilterList()
|
||||||
|
|
|
@ -2,7 +2,7 @@ package eu.kanade.tachiyomi.extension.ko.mangashowme
|
||||||
|
|
||||||
import org.json.JSONArray
|
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 domains = JSONArray("[${scripts.substringBetween("var cdn_domains = [", "];")}]")
|
||||||
private val chapter = scripts.substringBetween("var chapter = ", ";")
|
private val chapter = scripts.substringBetween("var chapter = ", ";")
|
||||||
.toIntOrNull() ?: 0
|
.toIntOrNull() ?: 0
|
||||||
|
|
|
@ -6,7 +6,6 @@ import eu.kanade.tachiyomi.source.model.FilterList
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
|
|
||||||
|
|
||||||
// TODO: Completely Implement/Update Filters(Genre/Artist).
|
// TODO: Completely Implement/Update Filters(Genre/Artist).
|
||||||
private class TextField(name: String, val key: String) : Filter.Text(name)
|
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 SearchStatusList : Filter.Select<String>("Status", searchStatus())
|
||||||
private class SearchOrderList : Filter.Select<String>("Order", order())
|
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')
|
// [`"Not Set"`, ...[...document.querySelectorAll(".categories ul[data-type='1'] li")].map((el, i) => `"${el.innerText.trim()}"`)].join(',\n')
|
||||||
private fun searchNaming() = arrayOf(
|
private fun searchNaming() = arrayOf(
|
||||||
"Not Set",
|
"Not Set",
|
||||||
|
|
|
@ -4,10 +4,6 @@ import android.graphics.Bitmap
|
||||||
import android.graphics.BitmapFactory
|
import android.graphics.BitmapFactory
|
||||||
import android.graphics.Canvas
|
import android.graphics.Canvas
|
||||||
import android.graphics.Rect
|
import android.graphics.Rect
|
||||||
import okhttp3.Interceptor
|
|
||||||
import okhttp3.MediaType
|
|
||||||
import okhttp3.Response
|
|
||||||
import okhttp3.ResponseBody
|
|
||||||
import java.io.ByteArrayOutputStream
|
import java.io.ByteArrayOutputStream
|
||||||
import java.io.IOException
|
import java.io.IOException
|
||||||
import java.io.InputStream
|
import java.io.InputStream
|
||||||
|
@ -15,7 +11,10 @@ import kotlin.math.cos
|
||||||
import kotlin.math.floor
|
import kotlin.math.floor
|
||||||
import kotlin.math.sin
|
import kotlin.math.sin
|
||||||
import kotlin.math.tan
|
import kotlin.math.tan
|
||||||
|
import okhttp3.Interceptor
|
||||||
|
import okhttp3.MediaType
|
||||||
|
import okhttp3.Response
|
||||||
|
import okhttp3.ResponseBody
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* `v1` means url padding of image host.
|
* `v1` means url padding of image host.
|
||||||
|
@ -34,7 +33,6 @@ internal class ImageDecoder(scripts: String) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
internal class ImageDecoderInterceptor : Interceptor {
|
internal class ImageDecoderInterceptor : Interceptor {
|
||||||
override fun intercept(chain: Interceptor.Chain): Response {
|
override fun intercept(chain: Interceptor.Chain): Response {
|
||||||
val req = chain.request()
|
val req = chain.request()
|
||||||
|
@ -91,7 +89,7 @@ internal class ImageDecoderInterceptor : Interceptor {
|
||||||
var cx = ManaMoa.V1_CX
|
var cx = ManaMoa.V1_CX
|
||||||
var cy = ManaMoa.V1_CY
|
var cy = ManaMoa.V1_CY
|
||||||
|
|
||||||
//view_cnt / 10 > 30000 ? (this._CX = 1, this._CY = 6) : view_cnt / 10 > 20000 ? this._CX = 1 : view_cnt / 10 > 10000 && (this._CY = 1)
|
// view_cnt / 10 > 30000 ? (this._CX = 1, this._CY = 6) : view_cnt / 10 > 20000 ? this._CX = 1 : view_cnt / 10 > 10000 && (this._CY = 1)
|
||||||
// DO NOT (AUTOMATICALLY) REPLACE TO when USING IDEA. seems it doesn't detect correct condition
|
// DO NOT (AUTOMATICALLY) REPLACE TO when USING IDEA. seems it doesn't detect correct condition
|
||||||
if (viewCnt > 30000) {
|
if (viewCnt > 30000) {
|
||||||
cx = 1
|
cx = 1
|
||||||
|
@ -102,7 +100,7 @@ internal class ImageDecoderInterceptor : Interceptor {
|
||||||
cy = 1
|
cy = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
//decode image
|
// decode image
|
||||||
val order = Array(cx * cy) { IntArray(2) }
|
val order = Array(cx * cy) { IntArray(2) }
|
||||||
val oSize = order.size - 1
|
val oSize = order.size - 1
|
||||||
|
|
||||||
|
@ -113,7 +111,7 @@ internal class ImageDecoderInterceptor : Interceptor {
|
||||||
|
|
||||||
java.util.Arrays.sort(order) { a, b -> a[1].toDouble().compareTo(b[1].toDouble()) }
|
java.util.Arrays.sort(order) { a, b -> a[1].toDouble().compareTo(b[1].toDouble()) }
|
||||||
|
|
||||||
//create new bitmap
|
// create new bitmap
|
||||||
val outputWidth = if (half == 0) input.width else input.width / 2
|
val outputWidth = if (half == 0) input.width else input.width / 2
|
||||||
val output = Bitmap.createBitmap(outputWidth, input.height, Bitmap.Config.ARGB_8888)
|
val output = Bitmap.createBitmap(outputWidth, input.height, Bitmap.Config.ARGB_8888)
|
||||||
val canvas = Canvas(output)
|
val canvas = Canvas(output)
|
||||||
|
|
|
@ -13,10 +13,23 @@ import eu.kanade.tachiyomi.extension.BuildConfig
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.network.asObservableSuccess
|
import eu.kanade.tachiyomi.network.asObservableSuccess
|
||||||
import eu.kanade.tachiyomi.source.ConfigurableSource
|
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.source.online.ParsedHttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
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.json.JSONArray
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
|
@ -24,12 +37,6 @@ import org.jsoup.select.Elements
|
||||||
import rx.Observable
|
import rx.Observable
|
||||||
import uy.kohesive.injekt.Injekt
|
import uy.kohesive.injekt.Injekt
|
||||||
import uy.kohesive.injekt.api.get
|
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
|
* ManaMoa Source
|
||||||
|
@ -118,7 +125,6 @@ class ManaMoa : ConfigurableSource, ParsedHttpSource() {
|
||||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request =
|
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request =
|
||||||
searchComplexFilterMangaRequestBuilder(baseUrl, page, query, filters)
|
searchComplexFilterMangaRequestBuilder(baseUrl, page, query, filters)
|
||||||
|
|
||||||
|
|
||||||
override fun mangaDetailsParse(document: Document): SManga {
|
override fun mangaDetailsParse(document: Document): SManga {
|
||||||
val info = document.select("div.left-info").first()
|
val info = document.select("div.left-info").first()
|
||||||
val thumbnailElement = info.select("div.manga-thumbnail").first()
|
val thumbnailElement = info.select("div.manga-thumbnail").first()
|
||||||
|
@ -127,7 +133,7 @@ class ManaMoa : ConfigurableSource, ParsedHttpSource() {
|
||||||
|
|
||||||
val mangaStatus = info.select("div.recommend")
|
val mangaStatus = info.select("div.recommend")
|
||||||
val mangaLike = mangaStatus.select(".fa-thumbs-up").trimText("0")
|
val mangaLike = mangaStatus.select(".fa-thumbs-up").trimText("0")
|
||||||
//val mangaViews = trimElementText(mangaStatus.select(".fa-smile-o"), "0")
|
// val mangaViews = trimElementText(mangaStatus.select(".fa-smile-o"), "0")
|
||||||
val mangaComments = mangaStatus.select(".fa-comment").trimText("0")
|
val mangaComments = mangaStatus.select(".fa-comment").trimText("0")
|
||||||
val mangaBookmarks = info.select(".fa-bookmark").trimText("0")
|
val mangaBookmarks = info.select(".fa-bookmark").trimText("0")
|
||||||
val mangaChaptersLike = mangaElementsSum(document.select(".title i.fa.fa-thumbs-up > span"))
|
val mangaChaptersLike = mangaElementsSum(document.select(".title i.fa.fa-thumbs-up > span"))
|
||||||
|
@ -145,7 +151,7 @@ class ManaMoa : ConfigurableSource, ParsedHttpSource() {
|
||||||
manga.description =
|
manga.description =
|
||||||
"\uD83D\uDCDD: $publishTypeText\n" +
|
"\uD83D\uDCDD: $publishTypeText\n" +
|
||||||
"👍: $mangaLike ($mangaChaptersLike)\n" +
|
"👍: $mangaLike ($mangaChaptersLike)\n" +
|
||||||
//"\uD83D\uDD0D: $mangaViews\n" +
|
// "\uD83D\uDD0D: $mangaViews\n" +
|
||||||
"\uD83D\uDCAC: $mangaComments ($mangaChaptersComments)\n" +
|
"\uD83D\uDCAC: $mangaComments ($mangaChaptersComments)\n" +
|
||||||
"\uD83D\uDD16: $mangaBookmarks"
|
"\uD83D\uDD16: $mangaBookmarks"
|
||||||
manga.author = authorText
|
manga.author = authorText
|
||||||
|
@ -218,16 +224,15 @@ class ManaMoa : ConfigurableSource, ParsedHttpSource() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// They are using full url in every links.
|
// They are using full url in every links.
|
||||||
// There's possibility to using another domain for serve manga(s). Like marumaru.
|
// There's possibility to using another domain for serve manga(s). Like marumaru.
|
||||||
//override fun pageListRequest(chapter: SChapter) = GET(chapter.url, headers)
|
// override fun pageListRequest(chapter: SChapter) = GET(chapter.url, headers)
|
||||||
override fun pageListParse(document: Document): List<Page> {
|
override fun pageListParse(document: Document): List<Page> {
|
||||||
val pages = mutableListOf<Page>()
|
val pages = mutableListOf<Page>()
|
||||||
|
|
||||||
try {
|
try {
|
||||||
val element = document.toString()
|
val element = document.toString()
|
||||||
val cdnHandler = CDNUrlHandler(element)
|
val cdnHandler = MMCDNUrlHandler(element)
|
||||||
|
|
||||||
val imageUrl = element.substringBetween("var img_list = [", "];")
|
val imageUrl = element.substringBetween("var img_list = [", "];")
|
||||||
val imageUrls = cdnHandler.replace(JSONArray("[$imageUrl]"))
|
val imageUrls = cdnHandler.replace(JSONArray("[$imageUrl]"))
|
||||||
|
@ -276,7 +281,6 @@ class ManaMoa : ConfigurableSource, ParsedHttpSource() {
|
||||||
return GET(page.imageUrl!!, requestHeaders)
|
return GET(page.imageUrl!!, requestHeaders)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Latest not supported
|
// Latest not supported
|
||||||
override fun latestUpdatesSelector() = ".post-row > div.media.post-list"
|
override fun latestUpdatesSelector() = ".post-row > div.media.post-list"
|
||||||
|
|
||||||
|
@ -287,9 +291,9 @@ class ManaMoa : ConfigurableSource, ParsedHttpSource() {
|
||||||
// TODO: Make Clear Regex.
|
// TODO: Make Clear Regex.
|
||||||
val chapterRegex = Regex("""((?:\s+)(?:(?:(?:[0-9]+권)?(?:[0-9]+부)?(?:[0-9]*?시즌[0-9]*?)?)?(?:\s*)(?:(?:[0-9]+)(?:[-.](?:[0-9]+))?)?(?:\s*[~,]\s*)?(?:[0-9]+)(?:[-.](?:[0-9]+))?)(?:화))""")
|
val chapterRegex = Regex("""((?:\s+)(?:(?:(?:[0-9]+권)?(?:[0-9]+부)?(?:[0-9]*?시즌[0-9]*?)?)?(?:\s*)(?:(?:[0-9]+)(?:[-.](?:[0-9]+))?)?(?:\s*[~,]\s*)?(?:[0-9]+)(?:[-.](?:[0-9]+))?)(?:화))""")
|
||||||
val title = rawTitle.trim().replace(chapterRegex, "")
|
val title = rawTitle.trim().replace(chapterRegex, "")
|
||||||
//val regexSpecialChapter = Regex("(부록|단편|외전|.+편)")
|
// val regexSpecialChapter = Regex("(부록|단편|외전|.+편)")
|
||||||
//val lastTitleWord = excludeChapterTitle.split(" ").last()
|
// val lastTitleWord = excludeChapterTitle.split(" ").last()
|
||||||
//val title = excludeChapterTitle.replace(lastTitleWord, lastTitleWord.replace(regexSpecialChapter, ""))
|
// val title = excludeChapterTitle.replace(lastTitleWord, lastTitleWord.replace(regexSpecialChapter, ""))
|
||||||
|
|
||||||
val manga = SManga.create()
|
val manga = SManga.create()
|
||||||
manga.url = linkElement.attr("href")
|
manga.url = linkElement.attr("href")
|
||||||
|
@ -302,8 +306,7 @@ 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 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)"
|
override fun latestUpdatesNextPageSelector() = "ul.pagination > li:not(.disabled)"
|
||||||
|
|
||||||
|
// We are able to get the image URL directly from the page list
|
||||||
//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!")
|
override fun imageUrlParse(document: Document) = throw UnsupportedOperationException("This method should not be called!")
|
||||||
|
|
||||||
private fun urlFinder(style: String): String {
|
private fun urlFinder(style: String): String {
|
||||||
|
@ -341,7 +344,7 @@ class ManaMoa : ConfigurableSource, ParsedHttpSource() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val autoFetchUrlPref = androidx.preference.CheckBoxPreference (screen.context).apply {
|
val autoFetchUrlPref = androidx.preference.CheckBoxPreference(screen.context).apply {
|
||||||
key = AUTOFETCH_URL_PREF_TITLE
|
key = AUTOFETCH_URL_PREF_TITLE
|
||||||
title = AUTOFETCH_URL_PREF_TITLE
|
title = AUTOFETCH_URL_PREF_TITLE
|
||||||
summary = AUTOFETCH_URL_PREF_SUMMARY
|
summary = AUTOFETCH_URL_PREF_SUMMARY
|
||||||
|
@ -462,21 +465,21 @@ class ManaMoa : ConfigurableSource, ParsedHttpSource() {
|
||||||
}
|
}
|
||||||
|
|
||||||
val request: Request = Request.Builder().get()
|
val request: Request = Request.Builder().get()
|
||||||
//.url("https://mnmnmnmnm.xyz/")
|
// .url("https://mnmnmnmnm.xyz/")
|
||||||
.url("http://52.74.159.59")
|
.url("http://52.74.159.59")
|
||||||
.build()
|
.build()
|
||||||
|
|
||||||
val future = CallbackFuture()
|
val future = CallbackFuture()
|
||||||
network.client
|
network.client
|
||||||
//.newBuilder()
|
// .newBuilder()
|
||||||
//.addInterceptor(DDOSGuardInterceptor())
|
// .addInterceptor(DDOSGuardInterceptor())
|
||||||
//.build()!!
|
// .build()!!
|
||||||
.newCall(request).enqueue(future)
|
.newCall(request).enqueue(future)
|
||||||
|
|
||||||
val response = future.get()!!
|
val response = future.get()!!
|
||||||
return "https://${response.request().url().host()}"
|
return "https://${response.request().url().host()}"
|
||||||
//val code = response.body().toString().substringBetween("manamoa", ".net")
|
// val code = response.body().toString().substringBetween("manamoa", ".net")
|
||||||
//return "https://manamoa$code.net"
|
// return "https://manamoa$code.net"
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
e.printStackTrace()
|
e.printStackTrace()
|
||||||
return prefBaseUrl
|
return prefBaseUrl
|
||||||
|
@ -486,7 +489,6 @@ class ManaMoa : ConfigurableSource, ParsedHttpSource() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private fun getPrefBaseUrl(): String = preferences.getString(BASE_URL_PREF, defaultBaseUrl)!!
|
private fun getPrefBaseUrl(): String = preferences.getString(BASE_URL_PREF, defaultBaseUrl)!!
|
||||||
private fun getExperimentLatest(): Boolean = preferences.getBoolean(EXPERIMENTAL_LATEST_PREF, false)
|
private fun getExperimentLatest(): Boolean = preferences.getBoolean(EXPERIMENTAL_LATEST_PREF, false)
|
||||||
|
|
||||||
|
|
|
@ -31,5 +31,4 @@ class ManaMoaUrlActivity : Activity() {
|
||||||
finish()
|
finish()
|
||||||
exitProcess(0)
|
exitProcess(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,11 +5,11 @@ import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.source.model.SChapter
|
import eu.kanade.tachiyomi.source.model.SChapter
|
||||||
import eu.kanade.tachiyomi.source.model.SManga
|
import eu.kanade.tachiyomi.source.model.SManga
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
import eu.kanade.tachiyomi.util.asJsoup
|
||||||
import okhttp3.Response
|
|
||||||
import org.jsoup.nodes.Element
|
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
import java.util.Calendar
|
import java.util.Calendar
|
||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
|
import okhttp3.Response
|
||||||
|
import org.jsoup.nodes.Element
|
||||||
|
|
||||||
class NaverWebtoon : NaverComicBase("webtoon") {
|
class NaverWebtoon : NaverComicBase("webtoon") {
|
||||||
override val name = "Naver Webtoon"
|
override val name = "Naver Webtoon"
|
||||||
|
|
|
@ -8,14 +8,14 @@ import eu.kanade.tachiyomi.source.model.SChapter
|
||||||
import eu.kanade.tachiyomi.source.model.SManga
|
import eu.kanade.tachiyomi.source.model.SManga
|
||||||
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
import eu.kanade.tachiyomi.util.asJsoup
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.Calendar
|
||||||
|
import java.util.Locale
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
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() {
|
abstract class NaverComicBase(protected val mType: String) : ParsedHttpSource() {
|
||||||
override val lang: String = "ko"
|
override val lang: String = "ko"
|
||||||
|
@ -131,7 +131,7 @@ abstract class NaverComicBase(protected val mType: String) : ParsedHttpSource()
|
||||||
return pages
|
return pages
|
||||||
}
|
}
|
||||||
|
|
||||||
//We are able to get the image URL directly from the page list
|
// 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!")
|
override fun imageUrlParse(document: Document) = throw UnsupportedOperationException("This method should not be called!")
|
||||||
|
|
||||||
override fun getFilterList() = FilterList()
|
override fun getFilterList() = FilterList()
|
||||||
|
|
|
@ -9,4 +9,4 @@ class NaverComicFactory : SourceFactory {
|
||||||
NaverBestChallenge(),
|
NaverBestChallenge(),
|
||||||
NaverChallenge()
|
NaverChallenge()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,9 +9,15 @@ import android.widget.Toast
|
||||||
import eu.kanade.tachiyomi.extension.BuildConfig
|
import eu.kanade.tachiyomi.extension.BuildConfig
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.source.ConfigurableSource
|
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.source.online.ParsedHttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
import eu.kanade.tachiyomi.util.asJsoup
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.Calendar
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
|
@ -19,8 +25,6 @@ import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import uy.kohesive.injekt.Injekt
|
import uy.kohesive.injekt.Injekt
|
||||||
import uy.kohesive.injekt.api.get
|
import uy.kohesive.injekt.api.get
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* NewToki Source
|
* NewToki Source
|
||||||
|
@ -31,7 +35,6 @@ open class NewToki(override val name: String, private val defaultBaseUrl: String
|
||||||
override val supportsLatest = true
|
override val supportsLatest = true
|
||||||
override val client: OkHttpClient = network.cloudflareClient
|
override val client: OkHttpClient = network.cloudflareClient
|
||||||
|
|
||||||
|
|
||||||
override fun popularMangaSelector() = "div#webtoon-list > ul > li"
|
override fun popularMangaSelector() = "div#webtoon-list > ul > li"
|
||||||
|
|
||||||
override fun popularMangaFromElement(element: Element): SManga {
|
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 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 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 {
|
override fun mangaDetailsParse(document: Document): SManga {
|
||||||
val info = document.select("div.view-title > .view-content").first()
|
val info = document.select("div.view-title > .view-content").first()
|
||||||
val title = document.select("div.view-content > span > b").text()
|
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> {
|
override fun pageListParse(document: Document): List<Page> {
|
||||||
val pages = mutableListOf<Page>()
|
val pages = mutableListOf<Page>()
|
||||||
try {
|
try {
|
||||||
|
@ -181,15 +182,13 @@ open class NewToki(override val name: String, private val defaultBaseUrl: String
|
||||||
return pages
|
return pages
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
override fun latestUpdatesSelector() = popularMangaSelector()
|
override fun latestUpdatesSelector() = popularMangaSelector()
|
||||||
override fun latestUpdatesFromElement(element: Element) = popularMangaFromElement(element)
|
override fun latestUpdatesFromElement(element: Element) = popularMangaFromElement(element)
|
||||||
override fun latestUpdatesRequest(page: Int) = popularMangaRequest(page)
|
override fun latestUpdatesRequest(page: Int) = popularMangaRequest(page)
|
||||||
override fun latestUpdatesNextPageSelector() = popularMangaNextPageSelector()
|
override fun latestUpdatesNextPageSelector() = popularMangaNextPageSelector()
|
||||||
override fun latestUpdatesParse(response: Response) = popularMangaParse(response)
|
override fun latestUpdatesParse(response: Response) = popularMangaParse(response)
|
||||||
|
|
||||||
|
// We are able to get the image URL directly from the page list
|
||||||
//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!")
|
override fun imageUrlParse(document: Document) = throw UnsupportedOperationException("This method should not be called!")
|
||||||
|
|
||||||
override fun getFilterList() = FilterList()
|
override fun getFilterList() = FilterList()
|
||||||
|
|
|
@ -5,11 +5,11 @@ import eu.kanade.tachiyomi.source.Source
|
||||||
import eu.kanade.tachiyomi.source.SourceFactory
|
import eu.kanade.tachiyomi.source.SourceFactory
|
||||||
import eu.kanade.tachiyomi.source.model.Filter
|
import eu.kanade.tachiyomi.source.model.Filter
|
||||||
import eu.kanade.tachiyomi.source.model.FilterList
|
import eu.kanade.tachiyomi.source.model.FilterList
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.Date
|
||||||
|
import java.util.Locale
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
import okhttp3.Request
|
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)
|
* Source changes domain names approximately once every 10 days (e.g. newtoki31.net to newtoki32.net)
|
||||||
|
|
|
@ -6,16 +6,21 @@ import com.github.salomonbrys.kotson.string
|
||||||
import com.google.gson.JsonObject
|
import com.google.gson.JsonObject
|
||||||
import com.google.gson.JsonParser
|
import com.google.gson.JsonParser
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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.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.ParseException
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
import java.util.Locale
|
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() {
|
class AnimaRegia : ParsedHttpSource() {
|
||||||
|
|
||||||
|
@ -78,7 +83,7 @@ class AnimaRegia : ParsedHttpSource() {
|
||||||
val url = HttpUrl.parse("$baseUrl/search")!!.newBuilder()
|
val url = HttpUrl.parse("$baseUrl/search")!!.newBuilder()
|
||||||
.addQueryParameter("query", query)
|
.addQueryParameter("query", query)
|
||||||
|
|
||||||
return GET(url.toString(), newHeaders)
|
return GET(url.toString(), newHeaders)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun searchMangaParse(response: Response): MangasPage {
|
override fun searchMangaParse(response: Response): MangasPage {
|
||||||
|
@ -130,7 +135,7 @@ class AnimaRegia : ParsedHttpSource() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun parseChapterDate(date: String) : Long {
|
private fun parseChapterDate(date: String): Long {
|
||||||
return try {
|
return try {
|
||||||
SimpleDateFormat("dd MMM. yyyy", Locale.ENGLISH).parse(date).time
|
SimpleDateFormat("dd MMM. yyyy", Locale.ENGLISH).parse(date).time
|
||||||
} catch (e: ParseException) {
|
} catch (e: ParseException) {
|
||||||
|
@ -149,7 +154,7 @@ class AnimaRegia : ParsedHttpSource() {
|
||||||
override fun pageListParse(document: Document): List<Page> {
|
override fun pageListParse(document: Document): List<Page> {
|
||||||
val pages = document.select("div.viewer-cnt img.img-responsive")
|
val pages = document.select("div.viewer-cnt img.img-responsive")
|
||||||
|
|
||||||
return pages.mapIndexed { i, element -> Page(i, "", element.absUrl("data-src"))}
|
return pages.mapIndexed { i, element -> Page(i, "", element.absUrl("data-src")) }
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun imageUrlParse(document: Document) = ""
|
override fun imageUrlParse(document: Document) = ""
|
||||||
|
|
|
@ -7,8 +7,16 @@ import com.google.gson.JsonArray
|
||||||
import com.google.gson.JsonParser
|
import com.google.gson.JsonParser
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.network.asObservableSuccess
|
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.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.Headers
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
|
@ -16,10 +24,6 @@ import okhttp3.Response
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import rx.Observable
|
import rx.Observable
|
||||||
import java.text.ParseException
|
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.*
|
|
||||||
import java.util.concurrent.TimeUnit
|
|
||||||
|
|
||||||
class CentralDeMangas : ParsedHttpSource() {
|
class CentralDeMangas : ParsedHttpSource() {
|
||||||
|
|
||||||
|
@ -144,7 +148,7 @@ class CentralDeMangas : ParsedHttpSource() {
|
||||||
?.let { parseChapterDate(it) } ?: 0
|
?.let { parseChapterDate(it) } ?: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun parseChapterDate(date: String) : Long {
|
private fun parseChapterDate(date: String): Long {
|
||||||
return try {
|
return try {
|
||||||
SimpleDateFormat("dd/MM/yyyy", Locale.ENGLISH).parse(date).time
|
SimpleDateFormat("dd/MM/yyyy", Locale.ENGLISH).parse(date).time
|
||||||
} catch (e: ParseException) {
|
} catch (e: ParseException) {
|
||||||
|
|
|
@ -2,15 +2,21 @@ package eu.kanade.tachiyomi.extension.pt.goldenmangas
|
||||||
|
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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 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.ParseException
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
import java.util.*
|
import java.util.Locale
|
||||||
import java.util.concurrent.TimeUnit
|
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() {
|
class GoldenMangas : ParsedHttpSource() {
|
||||||
|
|
||||||
|
@ -124,7 +130,7 @@ class GoldenMangas : ParsedHttpSource() {
|
||||||
val pages = chapImages.select("img[pag]")
|
val pages = chapImages.select("img[pag]")
|
||||||
|
|
||||||
return pages
|
return pages
|
||||||
.mapIndexed { i, element -> Page(i, "", baseUrl + element.attr("src"))}
|
.mapIndexed { i, element -> Page(i, "", baseUrl + element.attr("src")) }
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun imageUrlParse(document: Document) = ""
|
override fun imageUrlParse(document: Document) = ""
|
||||||
|
@ -133,7 +139,7 @@ class GoldenMangas : ParsedHttpSource() {
|
||||||
|
|
||||||
private fun removeLabel(text: String?): String = text!!.substringAfter(":").trim()
|
private fun removeLabel(text: String?): String = text!!.substringAfter(":").trim()
|
||||||
|
|
||||||
private fun parseChapterDate(date: String) : Long {
|
private fun parseChapterDate(date: String): Long {
|
||||||
return try {
|
return try {
|
||||||
SimpleDateFormat("(dd/MM/yyyy)", Locale.ENGLISH).parse(date).time
|
SimpleDateFormat("(dd/MM/yyyy)", Locale.ENGLISH).parse(date).time
|
||||||
} catch (e: ParseException) {
|
} catch (e: ParseException) {
|
||||||
|
|
|
@ -1,20 +1,32 @@
|
||||||
package eu.kanade.tachiyomi.extension.pt.hipercool
|
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.JsonArray
|
||||||
import com.google.gson.JsonObject
|
import com.google.gson.JsonObject
|
||||||
import com.google.gson.JsonParser
|
import com.google.gson.JsonParser
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.network.POST
|
import eu.kanade.tachiyomi.network.POST
|
||||||
import eu.kanade.tachiyomi.network.asObservableSuccess
|
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 eu.kanade.tachiyomi.source.online.HttpSource
|
||||||
import okhttp3.*
|
|
||||||
import rx.Observable
|
|
||||||
import java.lang.Exception
|
|
||||||
import java.text.ParseException
|
import java.text.ParseException
|
||||||
import java.text.SimpleDateFormat
|
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() {
|
class Hipercool : HttpSource() {
|
||||||
override val name = "HipercooL"
|
override val name = "HipercooL"
|
||||||
|
@ -205,7 +217,7 @@ class Hipercool : HttpSource() {
|
||||||
return GET(page.imageUrl!!, newHeaders)
|
return GET(page.imageUrl!!, newHeaders)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun parseChapterDate(date: String) : Long {
|
private fun parseChapterDate(date: String): Long {
|
||||||
return try {
|
return try {
|
||||||
SimpleDateFormat("yyyy-MM-dd", Locale.ENGLISH)
|
SimpleDateFormat("yyyy-MM-dd", Locale.ENGLISH)
|
||||||
.parse(date.substringBefore("T"))
|
.parse(date.substringBefore("T"))
|
||||||
|
@ -215,11 +227,11 @@ class Hipercool : HttpSource() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getThumbnailUrl(bookSlug: String, revision: Int): String
|
private fun getThumbnailUrl(bookSlug: String, revision: Int): String =
|
||||||
= "$STATIC_URL/books/$bookSlug/$bookSlug-cover.jpg?revision=$revision"
|
"$STATIC_URL/books/$bookSlug/$bookSlug-cover.jpg?revision=$revision"
|
||||||
|
|
||||||
private fun getPageUrl(bookSlug: String, chapterSlug: String, page: Int, revision: Int): String
|
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"
|
"$STATIC_URL/books/$bookSlug/$chapterSlug/$bookSlug-chapter-$chapterSlug-page-$page.jpg?revision=$revision"
|
||||||
|
|
||||||
private fun Response.asJsonObject(): JsonObject = JSON_PARSER.parse(body()!!.string()).obj
|
private fun Response.asJsonObject(): JsonObject = JSON_PARSER.parse(body()!!.string()).obj
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,11 @@ package eu.kanade.tachiyomi.extension.pt.hqdragon
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.network.POST
|
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.source.online.ParsedHttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
import eu.kanade.tachiyomi.util.asJsoup
|
||||||
import okhttp3.FormBody
|
import okhttp3.FormBody
|
||||||
|
@ -65,12 +69,12 @@ class HQDragon : ParsedHttpSource() {
|
||||||
val mangas = mutableListOf<SManga>()
|
val mangas = mutableListOf<SManga>()
|
||||||
|
|
||||||
document.select(latestUpdatesSelector())
|
document.select(latestUpdatesSelector())
|
||||||
.forEach{ mangas.add(latestUpdatesFromElements(it, it.nextElementSibling())) }
|
.forEach { mangas.add(latestUpdatesFromElements(it, it.nextElementSibling())) }
|
||||||
|
|
||||||
return MangasPage(mangas, document.select("a[href\$=5693-x-force-2018]").isEmpty())
|
return MangasPage(mangas, document.select("a[href\$=5693-x-force-2018]").isEmpty())
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun latestUpdatesFromElements(imageElement: Element, titleElement: Element) : SManga {
|
private fun latestUpdatesFromElements(imageElement: Element, titleElement: Element): SManga {
|
||||||
val manga = SManga.create()
|
val manga = SManga.create()
|
||||||
|
|
||||||
manga.thumbnail_url = imageElement.select("img").attr("src")
|
manga.thumbnail_url = imageElement.select("img").attr("src")
|
||||||
|
@ -157,5 +161,4 @@ class HQDragon : ParsedHttpSource() {
|
||||||
override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException("Not used")
|
override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException("Not used")
|
||||||
|
|
||||||
override fun getFilterList() = FilterList()
|
override fun getFilterList() = FilterList()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,12 @@ import com.github.salomonbrys.kotson.get
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
||||||
import com.google.gson.JsonObject
|
import com.google.gson.JsonObject
|
||||||
import eu.kanade.tachiyomi.network.POST
|
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 eu.kanade.tachiyomi.source.online.HttpSource
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
|
@ -151,33 +156,33 @@ class HQNow : HttpSource() {
|
||||||
)
|
)
|
||||||
|
|
||||||
private class LetterFilter : UriPartFilter("Letra", arrayOf(
|
private class LetterFilter : UriPartFilter("Letra", arrayOf(
|
||||||
Pair("---","<Selecione>"),
|
Pair("---", "<Selecione>"),
|
||||||
Pair("a","A"),
|
Pair("a", "A"),
|
||||||
Pair("b","B"),
|
Pair("b", "B"),
|
||||||
Pair("c","C"),
|
Pair("c", "C"),
|
||||||
Pair("d","D"),
|
Pair("d", "D"),
|
||||||
Pair("e","E"),
|
Pair("e", "E"),
|
||||||
Pair("f","F"),
|
Pair("f", "F"),
|
||||||
Pair("g","G"),
|
Pair("g", "G"),
|
||||||
Pair("h","H"),
|
Pair("h", "H"),
|
||||||
Pair("i","I"),
|
Pair("i", "I"),
|
||||||
Pair("j","J"),
|
Pair("j", "J"),
|
||||||
Pair("k","K"),
|
Pair("k", "K"),
|
||||||
Pair("l","L"),
|
Pair("l", "L"),
|
||||||
Pair("m","M"),
|
Pair("m", "M"),
|
||||||
Pair("n","N"),
|
Pair("n", "N"),
|
||||||
Pair("o","O"),
|
Pair("o", "O"),
|
||||||
Pair("p","P"),
|
Pair("p", "P"),
|
||||||
Pair("q","Q"),
|
Pair("q", "Q"),
|
||||||
Pair("r","R"),
|
Pair("r", "R"),
|
||||||
Pair("s","S"),
|
Pair("s", "S"),
|
||||||
Pair("t","T"),
|
Pair("t", "T"),
|
||||||
Pair("u","U"),
|
Pair("u", "U"),
|
||||||
Pair("v","V"),
|
Pair("v", "V"),
|
||||||
Pair("w","W"),
|
Pair("w", "W"),
|
||||||
Pair("x","X"),
|
Pair("x", "X"),
|
||||||
Pair("y","Y"),
|
Pair("y", "Y"),
|
||||||
Pair("z","Z")
|
Pair("z", "Z")
|
||||||
))
|
))
|
||||||
|
|
||||||
open class UriPartFilter(displayName: String, private val vals: Array<Pair<String, String>>) :
|
open class UriPartFilter(displayName: String, private val vals: Array<Pair<String, String>>) :
|
||||||
|
|
|
@ -1,8 +1,14 @@
|
||||||
package eu.kanade.tachiyomi.extension.pt.mangahost
|
package eu.kanade.tachiyomi.extension.pt.mangahost
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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 eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
||||||
|
import java.text.ParseException
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.Locale
|
||||||
import okhttp3.Headers
|
import okhttp3.Headers
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
|
@ -10,9 +16,6 @@ import org.jsoup.Jsoup
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import org.jsoup.select.Elements
|
import org.jsoup.select.Elements
|
||||||
import java.text.ParseException
|
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.Locale
|
|
||||||
|
|
||||||
class MangaHost : ParsedHttpSource() {
|
class MangaHost : ParsedHttpSource() {
|
||||||
|
|
||||||
|
@ -74,7 +77,7 @@ class MangaHost : ParsedHttpSource() {
|
||||||
val url = HttpUrl.parse("$baseUrl/find/")!!.newBuilder()
|
val url = HttpUrl.parse("$baseUrl/find/")!!.newBuilder()
|
||||||
.addQueryParameter("this", query)
|
.addQueryParameter("this", query)
|
||||||
|
|
||||||
return GET(url.toString(), headers)
|
return GET(url.toString(), headers)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun searchMangaSelector() = "table.table-search > tbody > tr > td:eq(0) > a"
|
override fun searchMangaSelector() = "table.table-search > tbody > tr > td:eq(0) > a"
|
||||||
|
@ -104,9 +107,8 @@ class MangaHost : ParsedHttpSource() {
|
||||||
else -> SManga.UNKNOWN
|
else -> SManga.UNKNOWN
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun chapterListSelector(): String
|
override fun chapterListSelector(): String =
|
||||||
= "ul.list_chapters li a, " +
|
"ul.list_chapters li a, table.table-hover:not(.table-mangas) > tbody > tr"
|
||||||
"table.table-hover:not(.table-mangas) > tbody > tr"
|
|
||||||
|
|
||||||
override fun chapterFromElement(element: Element): SChapter {
|
override fun chapterFromElement(element: Element): SChapter {
|
||||||
val isNewLayout = element.tagName() == "a"
|
val isNewLayout = element.tagName() == "a"
|
||||||
|
@ -170,7 +172,7 @@ class MangaHost : ParsedHttpSource() {
|
||||||
return GET(page.imageUrl!!, newHeaders)
|
return GET(page.imageUrl!!, newHeaders)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun SimpleDateFormat.tryParseTime(date: String) : Long {
|
private fun SimpleDateFormat.tryParseTime(date: String): Long {
|
||||||
return try {
|
return try {
|
||||||
parse(date).time
|
parse(date).time
|
||||||
} catch (e: ParseException) {
|
} catch (e: ParseException) {
|
||||||
|
|
|
@ -7,9 +7,17 @@ import com.google.gson.JsonObject
|
||||||
import com.google.gson.JsonParser
|
import com.google.gson.JsonParser
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.network.POST
|
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.source.online.HttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
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.FormBody
|
||||||
import okhttp3.Headers
|
import okhttp3.Headers
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
@ -19,11 +27,6 @@ import okhttp3.Request
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import rx.Observable
|
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(
|
abstract class MangasProject(
|
||||||
override val name: String,
|
override val name: String,
|
||||||
|
@ -227,7 +230,7 @@ abstract class MangasProject(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun parseChapterDate(date: String?) : Long {
|
private fun parseChapterDate(date: String?): Long {
|
||||||
return try {
|
return try {
|
||||||
DATE_FORMATTER.parse(date).time
|
DATE_FORMATTER.parse(date).time
|
||||||
} catch (e: ParseException) {
|
} catch (e: ParseException) {
|
||||||
|
@ -278,7 +281,7 @@ abstract class MangasProject(
|
||||||
|
|
||||||
return result["images"].array
|
return result["images"].array
|
||||||
.filter { it.string.startsWith("http") }
|
.filter { it.string.startsWith("http") }
|
||||||
.mapIndexed { i, obj -> Page(i, chapterUrl, obj.string)}
|
.mapIndexed { i, obj -> Page(i, chapterUrl, obj.string) }
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun fetchImageUrl(page: Page): Observable<String> = Observable.just(page.imageUrl!!)
|
override fun fetchImageUrl(page: Page): Observable<String> = Observable.just(page.imageUrl!!)
|
||||||
|
|
|
@ -2,7 +2,11 @@ package eu.kanade.tachiyomi.extension.pt.mangayabu
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.network.POST
|
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.source.online.ParsedHttpSource
|
||||||
import okhttp3.FormBody
|
import okhttp3.FormBody
|
||||||
import okhttp3.Headers
|
import okhttp3.Headers
|
||||||
|
@ -119,7 +123,7 @@ class MangaYabu : ParsedHttpSource() {
|
||||||
|
|
||||||
override fun pageListParse(document: Document): List<Page> {
|
override fun pageListParse(document: Document): List<Page> {
|
||||||
return document.select("img.img-responsive.img-manga")
|
return document.select("img.img-responsive.img-manga")
|
||||||
.mapIndexed { i, element -> Page(i, "", element.absUrl("src"))}
|
.mapIndexed { i, element -> Page(i, "", element.absUrl("src")) }
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun imageUrlParse(document: Document) = ""
|
override fun imageUrlParse(document: Document) = ""
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
package eu.kanade.tachiyomi.extension.pt.saikaiscan
|
package eu.kanade.tachiyomi.extension.pt.saikaiscan
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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.source.online.ParsedHttpSource
|
||||||
import okhttp3.Headers
|
import okhttp3.Headers
|
||||||
import okhttp3.HttpUrl
|
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 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()
|
private val CHAPTER_REGEX = "Capítulo (\\d+)".toRegex()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,42 @@
|
||||||
package eu.kanade.tachiyomi.extension.pt.superhentais
|
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.JsonObject
|
||||||
import com.google.gson.JsonParser
|
import com.google.gson.JsonParser
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.network.POST
|
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.source.online.ParsedHttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
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.FormBody
|
||||||
import okhttp3.Headers
|
import okhttp3.Headers
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
@ -38,7 +67,7 @@ class SuperHentais : ParsedHttpSource() {
|
||||||
filterGenreDel: List<String> = emptyList(),
|
filterGenreDel: List<String> = emptyList(),
|
||||||
typeUrl: String = "hentai-manga",
|
typeUrl: String = "hentai-manga",
|
||||||
page: Int = 1
|
page: Int = 1
|
||||||
) : Request {
|
): Request {
|
||||||
val filters = jsonObject(
|
val filters = jsonObject(
|
||||||
"filter_data" to filterData.toUrlQueryParams(),
|
"filter_data" to filterData.toUrlQueryParams(),
|
||||||
"filter_genre_add" to jsonArray(filterGenreAdd),
|
"filter_genre_add" to jsonArray(filterGenreAdd),
|
||||||
|
@ -64,7 +93,7 @@ class SuperHentais : ParsedHttpSource() {
|
||||||
return POST("$baseUrl/inc/paginator.inc.php", newHeaders, form)
|
return POST("$baseUrl/inc/paginator.inc.php", newHeaders, form)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun genericMangaFromElement(element: Element, imageAttr: String = "src") : SManga = SManga.create().apply {
|
private fun genericMangaFromElement(element: Element, imageAttr: String = "src"): SManga = SManga.create().apply {
|
||||||
title = element.select("img").first().attr("alt")
|
title = element.select("img").first().attr("alt")
|
||||||
thumbnail_url = element.select("img").first().attr(imageAttr).changeSize()
|
thumbnail_url = element.select("img").first().attr(imageAttr).changeSize()
|
||||||
setUrlWithoutDomain(element.attr("href"))
|
setUrlWithoutDomain(element.attr("href"))
|
||||||
|
@ -200,7 +229,7 @@ class SuperHentais : ParsedHttpSource() {
|
||||||
|
|
||||||
val chapters = mutableListOf<SChapter>()
|
val chapters = mutableListOf<SChapter>()
|
||||||
|
|
||||||
for (page in 1 .. totalPage) {
|
for (page in 1..totalPage) {
|
||||||
val result = client.newCall(chapterListPaginatedRequest(idCategory, page, totalPage, mangaUrl)).execute()
|
val result = client.newCall(chapterListPaginatedRequest(idCategory, page, totalPage, mangaUrl)).execute()
|
||||||
val apiResponse = result.asJsonObject()
|
val apiResponse = result.asJsonObject()
|
||||||
|
|
||||||
|
@ -243,7 +272,7 @@ class SuperHentais : ParsedHttpSource() {
|
||||||
|
|
||||||
override fun pageListParse(document: Document): List<Page> {
|
override fun pageListParse(document: Document): List<Page> {
|
||||||
return document.select("div.capituloViewBox img.lazy")
|
return document.select("div.capituloViewBox img.lazy")
|
||||||
.mapIndexed { i, element -> Page(i, "", element.absUrl("data-src"))}
|
.mapIndexed { i, element -> Page(i, "", element.absUrl("data-src")) }
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun imageUrlParse(document: Document) = ""
|
override fun imageUrlParse(document: Document) = ""
|
||||||
|
@ -253,7 +282,7 @@ class SuperHentais : ParsedHttpSource() {
|
||||||
private class ContentFilter : Filter.Select<String>("Tipo de Conteúdo",
|
private class ContentFilter : Filter.Select<String>("Tipo de Conteúdo",
|
||||||
CONTENT_LIST.map { it.third }.toTypedArray())
|
CONTENT_LIST.map { it.third }.toTypedArray())
|
||||||
|
|
||||||
private class LetterFilter: Filter.Select<String>("Letra inicial", LETTER_LIST)
|
private class LetterFilter : Filter.Select<String>("Letra inicial", LETTER_LIST)
|
||||||
|
|
||||||
private class StatusFilter : Filter.Select<String>("Status",
|
private class StatusFilter : Filter.Select<String>("Status",
|
||||||
STATUS_LIST.map { it.second }.toTypedArray())
|
STATUS_LIST.map { it.second }.toTypedArray())
|
||||||
|
@ -382,13 +411,13 @@ class SuperHentais : ParsedHttpSource() {
|
||||||
|
|
||||||
private fun Response.asJsonObject(): JsonObject = JSON_PARSER.parse(body()!!.string()).obj
|
private fun Response.asJsonObject(): JsonObject = JSON_PARSER.parse(body()!!.string()).obj
|
||||||
|
|
||||||
private fun Map<String, String>.toUrlQueryParams() : String =
|
private fun Map<String, String>.toUrlQueryParams(): String =
|
||||||
map { (k, v) -> "$k=$v" }.joinToString("&")
|
map { (k, v) -> "$k=$v" }.joinToString("&")
|
||||||
|
|
||||||
private fun FormBody.value(name: String): String {
|
private fun FormBody.value(name: String): String {
|
||||||
return (0 until size())
|
return (0 until size())
|
||||||
.first { name(it) == name }
|
.first { name(it) == name }
|
||||||
.let{ value(it) }
|
.let { value(it) }
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
@ -413,7 +442,7 @@ class SuperHentais : ParsedHttpSource() {
|
||||||
)
|
)
|
||||||
|
|
||||||
private val LETTER_LIST = listOf("Todas", "Caracteres Especiais")
|
private val LETTER_LIST = listOf("Todas", "Caracteres Especiais")
|
||||||
.plus(('A' .. 'Z').map { it.toString() })
|
.plus(('A'..'Z').map { it.toString() })
|
||||||
.toTypedArray()
|
.toTypedArray()
|
||||||
|
|
||||||
private val CONTENT_LIST = listOf(
|
private val CONTENT_LIST = listOf(
|
||||||
|
|
|
@ -8,8 +8,16 @@ import com.google.gson.JsonParser
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.network.POST
|
import eu.kanade.tachiyomi.network.POST
|
||||||
import eu.kanade.tachiyomi.network.asObservableSuccess
|
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.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.FormBody
|
||||||
import okhttp3.Headers
|
import okhttp3.Headers
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
|
@ -19,10 +27,6 @@ import okhttp3.Response
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import rx.Observable
|
import rx.Observable
|
||||||
import java.text.ParseException
|
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.Locale
|
|
||||||
import java.util.concurrent.TimeUnit
|
|
||||||
|
|
||||||
class UnionMangas : ParsedHttpSource() {
|
class UnionMangas : ParsedHttpSource() {
|
||||||
|
|
||||||
|
@ -126,12 +130,11 @@ class UnionMangas : ParsedHttpSource() {
|
||||||
val elAuthor = infoElement.select("div.row:eq(2) div.col-md-8:eq(4)").first()
|
val elAuthor = infoElement.select("div.row:eq(2) div.col-md-8:eq(4)").first()
|
||||||
val elArtist = infoElement.select("div.row:eq(2) div.col-md-8:eq(5)").first()
|
val elArtist = infoElement.select("div.row:eq(2) div.col-md-8:eq(5)").first()
|
||||||
val elGenre = infoElement.select("div.row:eq(2) div.col-md-8:eq(3)").first()
|
val elGenre = infoElement.select("div.row:eq(2) div.col-md-8:eq(3)").first()
|
||||||
val elStatus = infoElement.select("div.row:eq(2) div.col-md-8:eq(6)").first()
|
val elStatus = infoElement.select("div.row:eq(2) div.col-md-8:eq(6)").first()
|
||||||
val elDescription = infoElement.select("div.row:eq(2) div.col-md-8:eq(8)").first()
|
val elDescription = infoElement.select("div.row:eq(2) div.col-md-8:eq(8)").first()
|
||||||
val imgThumbnail = infoElement.select(".img-thumbnail").first()
|
val imgThumbnail = infoElement.select(".img-thumbnail").first()
|
||||||
val elTitle = infoElement.select("h2").first()
|
val elTitle = infoElement.select("h2").first()
|
||||||
|
|
||||||
|
|
||||||
return SManga.create().apply {
|
return SManga.create().apply {
|
||||||
title = elTitle!!.text().withoutLanguage()
|
title = elTitle!!.text().withoutLanguage()
|
||||||
author = elAuthor?.textWithoutLabel()
|
author = elAuthor?.textWithoutLabel()
|
||||||
|
@ -164,7 +167,7 @@ class UnionMangas : ParsedHttpSource() {
|
||||||
override fun pageListParse(document: Document): List<Page> {
|
override fun pageListParse(document: Document): List<Page> {
|
||||||
return document.select("img.img-responsive.img-manga")
|
return document.select("img.img-responsive.img-manga")
|
||||||
.filter { it.attr("src").contains("/leitor/") }
|
.filter { it.attr("src").contains("/leitor/") }
|
||||||
.mapIndexed { i, element -> Page(i, document.location(), element.absUrl("src"))}
|
.mapIndexed { i, element -> Page(i, document.location(), element.absUrl("src")) }
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun imageUrlParse(document: Document) = ""
|
override fun imageUrlParse(document: Document) = ""
|
||||||
|
@ -202,7 +205,7 @@ class UnionMangas : ParsedHttpSource() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun SimpleDateFormat.tryParseTime(date: String) : Long {
|
private fun SimpleDateFormat.tryParseTime(date: String): Long {
|
||||||
return try {
|
return try {
|
||||||
parse(date).time
|
parse(date).time
|
||||||
} catch (e: ParseException) {
|
} catch (e: ParseException) {
|
||||||
|
|
|
@ -1,15 +1,22 @@
|
||||||
package eu.kanade.tachiyomi.extension.pt.zinnes
|
package eu.kanade.tachiyomi.extension.pt.zinnes
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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.source.online.ParsedHttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
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.ParseException
|
||||||
import java.text.SimpleDateFormat
|
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() {
|
class Zinnes : ParsedHttpSource() {
|
||||||
|
|
||||||
|
@ -116,7 +123,7 @@ class Zinnes : ParsedHttpSource() {
|
||||||
|
|
||||||
override fun latestUpdatesFromElement(element: Element): SManga = throw Exception("This method should not be called!")
|
override fun latestUpdatesFromElement(element: Element): SManga = throw Exception("This method should not be called!")
|
||||||
|
|
||||||
private fun parseChapterDate(date: String) : Long {
|
private fun parseChapterDate(date: String): Long {
|
||||||
return try {
|
return try {
|
||||||
SimpleDateFormat("dd MMM, yyyy", Locale("pt", "BR")).parse(date).time
|
SimpleDateFormat("dd MMM, yyyy", Locale("pt", "BR")).parse(date).time
|
||||||
} catch (e: ParseException) {
|
} catch (e: ParseException) {
|
||||||
|
|
|
@ -1,14 +1,18 @@
|
||||||
package eu.kanade.tachiyomi.extension.ru.acomics
|
package eu.kanade.tachiyomi.extension.ru.acomics
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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.source.online.ParsedHttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
import eu.kanade.tachiyomi.util.asJsoup
|
||||||
|
import java.net.URLEncoder
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.net.URLEncoder
|
|
||||||
|
|
||||||
class AComics : ParsedHttpSource() {
|
class AComics : ParsedHttpSource() {
|
||||||
|
|
||||||
|
@ -18,15 +22,16 @@ class AComics : ParsedHttpSource() {
|
||||||
|
|
||||||
override val lang = "ru"
|
override val lang = "ru"
|
||||||
|
|
||||||
val cookiesHeader by lazy {
|
private val cookiesHeader by lazy {
|
||||||
val cookies = mutableMapOf<String, String>()
|
val cookies = mutableMapOf<String, String>()
|
||||||
cookies.put("ageRestrict", "17")
|
cookies["ageRestrict"] = "17"
|
||||||
buildCookies(cookies)
|
buildCookies(cookies)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun buildCookies(cookies: Map<String, String>) = cookies.entries.map {
|
private fun buildCookies(cookies: Map<String, String>) =
|
||||||
"${URLEncoder.encode(it.key, "UTF-8")}=${URLEncoder.encode(it.value, "UTF-8")}"
|
cookies.entries.joinToString(separator = "; ", postfix = ";") {
|
||||||
}.joinToString(separator = "; ", postfix = ";")
|
"${URLEncoder.encode(it.key, "UTF-8")}=${URLEncoder.encode(it.value, "UTF-8")}"
|
||||||
|
}
|
||||||
|
|
||||||
override val client = network.client.newBuilder()
|
override val client = network.client.newBuilder()
|
||||||
.addNetworkInterceptor { chain ->
|
.addNetworkInterceptor { chain ->
|
||||||
|
@ -39,7 +44,6 @@ class AComics : ParsedHttpSource() {
|
||||||
chain.proceed(newReq)
|
chain.proceed(newReq)
|
||||||
}.build()!!
|
}.build()!!
|
||||||
|
|
||||||
|
|
||||||
override val supportsLatest = true
|
override val supportsLatest = true
|
||||||
|
|
||||||
override fun popularMangaRequest(page: Int): Request =
|
override fun popularMangaRequest(page: Int): Request =
|
||||||
|
@ -114,7 +118,6 @@ class AComics : ParsedHttpSource() {
|
||||||
|
|
||||||
override fun searchMangaNextPageSelector() = popularMangaNextPageSelector()
|
override fun searchMangaNextPageSelector() = popularMangaNextPageSelector()
|
||||||
|
|
||||||
|
|
||||||
override fun mangaDetailsParse(document: Document): SManga {
|
override fun mangaDetailsParse(document: Document): SManga {
|
||||||
val infoElement = document.select(".about-summary").first()
|
val infoElement = document.select(".about-summary").first()
|
||||||
val manga = SManga.create()
|
val manga = SManga.create()
|
||||||
|
@ -149,7 +152,6 @@ class AComics : ParsedHttpSource() {
|
||||||
override fun pageListParse(document: Document): List<Page> {
|
override fun pageListParse(document: Document): List<Page> {
|
||||||
val imageElement = document.select("img#mainImage").first()
|
val imageElement = document.select("img#mainImage").first()
|
||||||
return listOf(Page(0, imageUrl = baseUrl + imageElement.attr("src")))
|
return listOf(Page(0, imageUrl = baseUrl + imageElement.attr("src")))
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun imageUrlParse(document: Document) = ""
|
override fun imageUrlParse(document: Document) = ""
|
||||||
|
@ -168,7 +170,6 @@ class AComics : ParsedHttpSource() {
|
||||||
Rating("18+", 6)
|
Rating("18+", 6)
|
||||||
))
|
))
|
||||||
|
|
||||||
|
|
||||||
override fun getFilterList() = FilterList(
|
override fun getFilterList() = FilterList(
|
||||||
Status(),
|
Status(),
|
||||||
RatingList(),
|
RatingList(),
|
||||||
|
@ -190,5 +191,4 @@ class AComics : ParsedHttpSource() {
|
||||||
Genre("Стимпанк", 12),
|
Genre("Стимпанк", 12),
|
||||||
Genre("Супергерои", 13)
|
Genre("Супергерои", 13)
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,22 @@
|
||||||
package eu.kanade.tachiyomi.extension.ru.anibe
|
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.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.source.online.ParsedHttpSource
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
|
import okhttp3.Response
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
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() {
|
class Anibe : ParsedHttpSource() {
|
||||||
|
|
||||||
|
@ -49,7 +55,7 @@ class Anibe : ParsedHttpSource() {
|
||||||
|
|
||||||
override fun popularMangaSelector() = "Unneeded"
|
override fun popularMangaSelector() = "Unneeded"
|
||||||
|
|
||||||
override fun popularMangaFromElement(element: Element): SManga = throw UnsupportedOperationException("Not used")
|
override fun popularMangaFromElement(element: Element): SManga = throw UnsupportedOperationException("Not used")
|
||||||
|
|
||||||
override fun popularMangaNextPageSelector() = "Unneeded"
|
override fun popularMangaNextPageSelector() = "Unneeded"
|
||||||
|
|
||||||
|
@ -91,7 +97,7 @@ class Anibe : ParsedHttpSource() {
|
||||||
manga.author = jsonManga["author"].asString
|
manga.author = jsonManga["author"].asString
|
||||||
val status = jsonManga["status"].asString
|
val status = jsonManga["status"].asString
|
||||||
manga.status = parseStatus(status)
|
manga.status = parseStatus(status)
|
||||||
manga.genre = jsonManga["genre"].toString().substringAfter("[").substringBefore("]").replace("\"" ,"").replace("," ," ")
|
manga.genre = jsonManga["genre"].toString().substringAfter("[").substringBefore("]").replace("\"", "").replace(",", " ")
|
||||||
manga.description = jsonManga["description"].asString
|
manga.description = jsonManga["description"].asString
|
||||||
manga.thumbnail_url = jsonManga["cover"].asString
|
manga.thumbnail_url = jsonManga["cover"].asString
|
||||||
return manga
|
return manga
|
||||||
|
@ -114,7 +120,7 @@ class Anibe : ParsedHttpSource() {
|
||||||
override fun chapterListParse(response: Response): List<SChapter> {
|
override fun chapterListParse(response: Response): List<SChapter> {
|
||||||
val allChapters = mutableListOf<SChapter>()
|
val allChapters = mutableListOf<SChapter>()
|
||||||
val jsonManga = gson.fromJson<JsonObject>(response.body()!!.string())
|
val jsonManga = gson.fromJson<JsonObject>(response.body()!!.string())
|
||||||
val jsonChapters = jsonManga["episodes"].asJsonObject.keys().sortedWith(Comparator<String>{ a, b ->
|
val jsonChapters = jsonManga["episodes"].asJsonObject.keys().sortedWith(Comparator<String> { a, b ->
|
||||||
when {
|
when {
|
||||||
a.substringBefore("_").toInt() < b.substringBefore("_").toInt() -> 1
|
a.substringBefore("_").toInt() < b.substringBefore("_").toInt() -> 1
|
||||||
a.substringBefore("_").toInt() > b.substringBefore("_").toInt() -> -1
|
a.substringBefore("_").toInt() > b.substringBefore("_").toInt() -> -1
|
||||||
|
@ -133,9 +139,9 @@ class Anibe : ParsedHttpSource() {
|
||||||
return allChapters
|
return allChapters
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun chapterListSelector() = throw UnsupportedOperationException("Not used")
|
override fun chapterListSelector() = throw UnsupportedOperationException("Not used")
|
||||||
|
|
||||||
override fun chapterFromElement(element: Element): SChapter = throw UnsupportedOperationException("Not used")
|
override fun chapterFromElement(element: Element): SChapter = throw UnsupportedOperationException("Not used")
|
||||||
|
|
||||||
// Pages
|
// Pages
|
||||||
|
|
||||||
|
@ -155,10 +161,9 @@ class Anibe : ParsedHttpSource() {
|
||||||
return pages
|
return pages
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun pageListParse(document: Document): List<Page> = throw UnsupportedOperationException("Not used")
|
override fun pageListParse(document: Document): List<Page> = throw UnsupportedOperationException("Not used")
|
||||||
|
|
||||||
override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException("Not used")
|
override fun imageUrlParse(document: Document): String = throw UnsupportedOperationException("Not used")
|
||||||
|
|
||||||
override fun getFilterList() = FilterList()
|
override fun getFilterList() = FilterList()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,13 @@ import eu.kanade.tachiyomi.source.model.SChapter
|
||||||
import eu.kanade.tachiyomi.source.model.SManga
|
import eu.kanade.tachiyomi.source.model.SManga
|
||||||
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
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.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
|
|
||||||
|
@ -34,11 +40,10 @@ class ComX : ParsedHttpSource() {
|
||||||
.domain("com-x.life")
|
.domain("com-x.life")
|
||||||
.path("/")
|
.path("/")
|
||||||
.name("antibot")
|
.name("antibot")
|
||||||
.value("e28a31fb6bcbc2858bdf53fac455d54a") // avoid - https://antibot.cloud/. Change cookie if userAgent changes
|
.value("e28a31fb6bcbc2858bdf53fac455d54a") // avoid - https://antibot.cloud/. Change cookie if userAgent changes
|
||||||
.build())
|
.build())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
.build()
|
.build()
|
||||||
|
|
||||||
|
@ -50,11 +55,9 @@ class ComX : ParsedHttpSource() {
|
||||||
|
|
||||||
override fun latestUpdatesSelector() = "ul.last-comix li"
|
override fun latestUpdatesSelector() = "ul.last-comix li"
|
||||||
|
|
||||||
override fun popularMangaRequest(page: Int): Request =
|
override fun popularMangaRequest(page: Int): Request = GET("$baseUrl/comix/page/$page/", headers)
|
||||||
GET("$baseUrl/comix/page/$page/", headers)
|
|
||||||
|
|
||||||
override fun latestUpdatesRequest(page: Int): Request =
|
override fun latestUpdatesRequest(page: Int): Request = GET(baseUrl, headers)
|
||||||
GET(baseUrl, headers)
|
|
||||||
|
|
||||||
override fun popularMangaFromElement(element: Element): SManga {
|
override fun popularMangaFromElement(element: Element): SManga {
|
||||||
val manga = SManga.create()
|
val manga = SManga.create()
|
||||||
|
@ -76,7 +79,6 @@ class ComX : ParsedHttpSource() {
|
||||||
return manga
|
return manga
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
override fun popularMangaNextPageSelector() = "div.nextprev:last-child"
|
override fun popularMangaNextPageSelector() = "div.nextprev:last-child"
|
||||||
|
|
||||||
override fun latestUpdatesNextPageSelector(): Nothing? = null
|
override fun latestUpdatesNextPageSelector(): Nothing? = null
|
||||||
|
@ -114,8 +116,8 @@ class ComX : ParsedHttpSource() {
|
||||||
if (!text.contains("Добавить описание на комикс")) {
|
if (!text.contains("Добавить описание на комикс")) {
|
||||||
val fromRemove = "Отслеживать"
|
val fromRemove = "Отслеживать"
|
||||||
val toRemove = "Читать комикс"
|
val toRemove = "Читать комикс"
|
||||||
val desc = text.removeRange(0, text.indexOf(fromRemove)+fromRemove.length)
|
val desc = text.removeRange(0, text.indexOf(fromRemove) + fromRemove.length)
|
||||||
manga.description = desc.removeRange(desc.indexOf(toRemove)+toRemove.length, desc.length)
|
manga.description = desc.removeRange(desc.indexOf(toRemove) + toRemove.length, desc.length)
|
||||||
}
|
}
|
||||||
|
|
||||||
val src = infoElement.select("img").attr("src")
|
val src = infoElement.select("img").attr("src")
|
||||||
|
@ -139,11 +141,11 @@ class ComX : ParsedHttpSource() {
|
||||||
|
|
||||||
override fun chapterListSelector() = "li[id^=cmx-]"
|
override fun chapterListSelector() = "li[id^=cmx-]"
|
||||||
|
|
||||||
private fun chapterResponseParse(document: Document) : List<SChapter> {
|
private fun chapterResponseParse(document: Document): List<SChapter> {
|
||||||
return document.select(chapterListSelector()).map { chapterFromElement(it) }
|
return document.select(chapterListSelector()).map { chapterFromElement(it) }
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun chapterPageListParse(document: Document) : List<String> {
|
private fun chapterPageListParse(document: Document): List<String> {
|
||||||
return document.select("span[class=\"\"]").map { it -> it.text() }
|
return document.select("span[class=\"\"]").map { it -> it.text() }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -192,10 +194,9 @@ class ComX : ParsedHttpSource() {
|
||||||
val urls: List<String> = html.substring(beginIndex + beginTag.length, endIndex)
|
val urls: List<String> = html.substring(beginIndex + beginTag.length, endIndex)
|
||||||
.split(',')
|
.split(',')
|
||||||
|
|
||||||
|
|
||||||
val pages = mutableListOf<Page>()
|
val pages = mutableListOf<Page>()
|
||||||
for (i in urls.indices) {
|
for (i in urls.indices) {
|
||||||
pages.add(Page(i, "", link+(urls[i].removeSurrounding("'"))))
|
pages.add(Page(i, "", link + (urls[i].removeSurrounding("'"))))
|
||||||
}
|
}
|
||||||
return pages
|
return pages
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +1,19 @@
|
||||||
package eu.kanade.tachiyomi.extension.ru.desu
|
package eu.kanade.tachiyomi.extension.ru.desu
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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 eu.kanade.tachiyomi.source.online.HttpSource
|
||||||
|
import java.util.ArrayList
|
||||||
import okhttp3.Headers
|
import okhttp3.Headers
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
import org.json.JSONArray
|
import org.json.JSONArray
|
||||||
import org.json.JSONObject
|
import org.json.JSONObject
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
class Desu : HttpSource() {
|
class Desu : HttpSource() {
|
||||||
override val name = "Desu"
|
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 popularMangaRequest(page: Int) = GET("$baseUrl/?limit=50&order=popular&page=$page")
|
||||||
|
|
||||||
override fun popularMangaParse(response: Response) = searchMangaParse(response)
|
override fun popularMangaParse(response: Response) = searchMangaParse(response)
|
||||||
|
@ -76,7 +80,7 @@ class Desu : HttpSource() {
|
||||||
when (filter) {
|
when (filter) {
|
||||||
is OrderBy -> url += "&order=" + arrayOf("popular", "updated", "name")[filter.state]
|
is OrderBy -> url += "&order=" + arrayOf("popular", "updated", "name")[filter.state]
|
||||||
is TypeList -> filter.state.forEach { type -> if (type.state) types.add(type) }
|
is TypeList -> filter.state.forEach { type -> if (type.state) types.add(type) }
|
||||||
is GenreList -> filter.state.forEach {genre -> if (genre.state) genres.add(genre) }
|
is GenreList -> filter.state.forEach { genre -> if (genre.state) genres.add(genre) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,7 +103,7 @@ class Desu : HttpSource() {
|
||||||
val count = nav.getInt("count")
|
val count = nav.getInt("count")
|
||||||
val limit = nav.getInt("limit")
|
val limit = nav.getInt("limit")
|
||||||
val page = nav.getInt("page")
|
val page = nav.getInt("page")
|
||||||
return mangaPageFromJSON(obj.toString(), count > page*limit)
|
return mangaPageFromJSON(obj.toString(), count > page * limit)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun mangaDetailsParse(response: Response) = SManga.create().apply {
|
override fun mangaDetailsParse(response: Response) = SManga.create().apply {
|
||||||
|
@ -127,7 +131,7 @@ class Desu : HttpSource() {
|
||||||
val id = obj2.getString("id")
|
val id = obj2.getString("id")
|
||||||
url = "/$cid/chapter/$id"
|
url = "/$cid/chapter/$id"
|
||||||
chapter_number = ch.toFloat()
|
chapter_number = ch.toFloat()
|
||||||
date_upload = obj2.getLong("date")*1000
|
date_upload = obj2.getLong("date") * 1000
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return ret
|
return ret
|
||||||
|
@ -144,8 +148,8 @@ class Desu : HttpSource() {
|
||||||
return ret
|
return ret
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun imageUrlParse(response: Response)
|
override fun imageUrlParse(response: Response) =
|
||||||
= throw UnsupportedOperationException("This method should not be called!")
|
throw UnsupportedOperationException("This method should not be called!")
|
||||||
|
|
||||||
private class OrderBy : Filter.Select<String>("Сортировка",
|
private class OrderBy : Filter.Select<String>("Сортировка",
|
||||||
arrayOf("Популярность", "Дата", "Имя"))
|
arrayOf("Популярность", "Дата", "Имя"))
|
||||||
|
|
|
@ -8,19 +8,23 @@ import com.google.gson.JsonArray
|
||||||
import com.google.gson.JsonObject
|
import com.google.gson.JsonObject
|
||||||
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
|
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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.source.online.ParsedHttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
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.Headers
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.net.URL
|
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
|
|
||||||
class Henchan : ParsedHttpSource() {
|
class Henchan : ParsedHttpSource() {
|
||||||
|
|
||||||
|
@ -52,8 +56,8 @@ class Henchan : ParsedHttpSource() {
|
||||||
} else {
|
} else {
|
||||||
var genres = ""
|
var genres = ""
|
||||||
var order = ""
|
var order = ""
|
||||||
filters.forEach {filter ->
|
filters.forEach { filter ->
|
||||||
when(filter){
|
when (filter) {
|
||||||
is GenreList -> {
|
is GenreList -> {
|
||||||
filter.state
|
filter.state
|
||||||
.filter { !it.isIgnored() }
|
.filter { !it.isIgnored() }
|
||||||
|
@ -65,7 +69,7 @@ class Henchan : ParsedHttpSource() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (genres.isNotEmpty()) {
|
if (genres.isNotEmpty()) {
|
||||||
filters.forEach {filter ->
|
filters.forEach { filter ->
|
||||||
when (filter) {
|
when (filter) {
|
||||||
is OrderBy -> {
|
is OrderBy -> {
|
||||||
order = filter.toUriPartWithGenres()
|
order = filter.toUriPartWithGenres()
|
||||||
|
@ -73,8 +77,8 @@ class Henchan : ParsedHttpSource() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
"$baseUrl/tags/${genres.dropLast(1)}&sort=manga$order?offset=${20 * (page - 1)}"
|
"$baseUrl/tags/${genres.dropLast(1)}&sort=manga$order?offset=${20 * (page - 1)}"
|
||||||
}else{
|
} else {
|
||||||
filters.forEach {filter ->
|
filters.forEach { filter ->
|
||||||
when (filter) {
|
when (filter) {
|
||||||
is OrderBy -> {
|
is OrderBy -> {
|
||||||
order = filter.toUriPartWithoutGenres()
|
order = filter.toUriPartWithoutGenres()
|
||||||
|
@ -97,8 +101,8 @@ class Henchan : ParsedHttpSource() {
|
||||||
val isExHenManga = this.contains("/manganew_thumbs_blur/")
|
val isExHenManga = this.contains("/manganew_thumbs_blur/")
|
||||||
val regex = "(?<=/)manganew_thumbs\\w*?(?=/)".toRegex(RegexOption.IGNORE_CASE)
|
val regex = "(?<=/)manganew_thumbs\\w*?(?=/)".toRegex(RegexOption.IGNORE_CASE)
|
||||||
return this.replace(regex, "showfull_retina/manga")
|
return this.replace(regex, "showfull_retina/manga")
|
||||||
.replace("_".plus(URL(baseUrl).host), "_hentaichan.ru") //domain-related replacing for very old mangas
|
.replace("_".plus(URL(baseUrl).host), "_hentaichan.ru") // domain-related replacing for very old mangas
|
||||||
.plus(if(isExHenManga) {"#"} else {""})// # for later so we know what type manga is it
|
.plus(if (isExHenManga) { "#" } else { "" }) // # for later so we know what type manga is it
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun popularMangaFromElement(element: Element): SManga {
|
override fun popularMangaFromElement(element: Element): SManga {
|
||||||
|
@ -148,7 +152,7 @@ class Henchan : ParsedHttpSource() {
|
||||||
val document = response.asJsoup()
|
val document = response.asJsoup()
|
||||||
|
|
||||||
// exhentai chapter
|
// exhentai chapter
|
||||||
if(responseUrl.contains("/manga/")){
|
if (responseUrl.contains("/manga/")) {
|
||||||
val chap = SChapter.create()
|
val chap = SChapter.create()
|
||||||
chap.setUrlWithoutDomain(responseUrl)
|
chap.setUrlWithoutDomain(responseUrl)
|
||||||
chap.name = document.select("a.title_top_a").text()
|
chap.name = document.select("a.title_top_a").text()
|
||||||
|
@ -170,7 +174,7 @@ class Henchan : ParsedHttpSource() {
|
||||||
.replace("\\\"", "\"")
|
.replace("\\\"", "\"")
|
||||||
.replace("\\'", "'")
|
.replace("\\'", "'")
|
||||||
chap.chapter_number = 1F
|
chap.chapter_number = 1F
|
||||||
chap.date_upload = Date().time //setting to current date because of a sorting in the "Recent updates" section
|
chap.date_upload = Date().time // setting to current date because of a sorting in the "Recent updates" section
|
||||||
return listOf(chap)
|
return listOf(chap)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -203,7 +207,7 @@ class Henchan : ParsedHttpSource() {
|
||||||
val chapterName = element.select("h2 a").attr("title")
|
val chapterName = element.select("h2 a").attr("title")
|
||||||
chapter.name = chapterName
|
chapter.name = chapterName
|
||||||
chapter.chapter_number = "(глава\\s|часть\\s)(\\d+)".toRegex(RegexOption.IGNORE_CASE).find(chapterName)?.groupValues?.get(2)?.toFloat() ?: 0F
|
chapter.chapter_number = "(глава\\s|часть\\s)(\\d+)".toRegex(RegexOption.IGNORE_CASE).find(chapterName)?.groupValues?.get(2)?.toFloat() ?: 0F
|
||||||
chapter.date_upload = Date().time //setting to current date because of a sorting in the "Recent updates" section
|
chapter.date_upload = Date().time // setting to current date because of a sorting in the "Recent updates" section
|
||||||
return chapter
|
return chapter
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -222,7 +226,7 @@ class Henchan : ParsedHttpSource() {
|
||||||
|
|
||||||
private fun Document.parseJsonArray(): JsonArray {
|
private fun Document.parseJsonArray(): JsonArray {
|
||||||
val imgScript = this.select("script:containsData(fullimg)").first().toString()
|
val imgScript = this.select("script:containsData(fullimg)").first().toString()
|
||||||
val imgString = imgScript.substring(imgScript.indexOf('{'), imgScript.lastIndexOf('}') + 1).replace(""", "\"")
|
val imgString = imgScript.substring(imgScript.indexOf('{'), imgScript.lastIndexOf('}') + 1).replace(""", "\"")
|
||||||
return gson.fromJson<JsonObject>(imgString)["fullimg"].array
|
return gson.fromJson<JsonObject>(imgString)["fullimg"].array
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -240,8 +244,8 @@ class Henchan : ParsedHttpSource() {
|
||||||
|
|
||||||
private open class UriPartFilter(displayName: String, sortNames: Array<String>, val withGenres: Array<Pair<String, String>>, val withoutGenres: Array<Pair<String, String>>) :
|
private open class UriPartFilter(displayName: String, sortNames: Array<String>, val withGenres: Array<Pair<String, String>>, val withoutGenres: Array<Pair<String, String>>) :
|
||||||
Filter.Sort(displayName, sortNames, Selection(1, false)) {
|
Filter.Sort(displayName, sortNames, Selection(1, false)) {
|
||||||
fun toUriPartWithGenres() = if(state!!.ascending) withGenres[state!!.index].first else withGenres[state!!.index].second
|
fun toUriPartWithGenres() = if (state!!.ascending) withGenres[state!!.index].first else withGenres[state!!.index].second
|
||||||
fun toUriPartWithoutGenres() = if(state!!.ascending) withoutGenres[state!!.index].first else withoutGenres[state!!.index].second
|
fun toUriPartWithoutGenres() = if (state!!.ascending) withoutGenres[state!!.index].first else withoutGenres[state!!.index].second
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getFilterList() = FilterList(
|
override fun getFilterList() = FilterList(
|
||||||
|
|
|
@ -4,25 +4,40 @@ import android.app.Application
|
||||||
import android.content.SharedPreferences
|
import android.content.SharedPreferences
|
||||||
import android.support.v7.preference.ListPreference
|
import android.support.v7.preference.ListPreference
|
||||||
import android.support.v7.preference.PreferenceScreen
|
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.JsonElement
|
||||||
import com.google.gson.JsonParser
|
import com.google.gson.JsonParser
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.network.POST
|
import eu.kanade.tachiyomi.network.POST
|
||||||
import eu.kanade.tachiyomi.network.asObservableSuccess
|
import eu.kanade.tachiyomi.network.asObservableSuccess
|
||||||
import eu.kanade.tachiyomi.source.ConfigurableSource
|
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.source.online.HttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
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 org.jsoup.nodes.Element
|
||||||
import rx.Observable
|
import rx.Observable
|
||||||
import uy.kohesive.injekt.Injekt
|
import uy.kohesive.injekt.Injekt
|
||||||
import uy.kohesive.injekt.api.get
|
import uy.kohesive.injekt.api.get
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.*
|
|
||||||
import android.util.Base64.decode as base64Decode
|
|
||||||
|
|
||||||
|
|
||||||
class LibManga : ConfigurableSource, HttpSource() {
|
class LibManga : ConfigurableSource, HttpSource() {
|
||||||
|
|
||||||
|
@ -209,12 +224,11 @@ class LibManga : ConfigurableSource, HttpSource() {
|
||||||
val teams = jsonParser.parse(element.attr("data-teams"))
|
val teams = jsonParser.parse(element.attr("data-teams"))
|
||||||
val team = teams[0]["slug"].nullString
|
val team = teams[0]["slug"].nullString
|
||||||
val baseUrl = "${element.baseUri()}/v$volume/c$number"
|
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.setUrlWithoutDomain(url)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
chapter.name = element.select("div.chapter-item__name").first().text()
|
chapter.name = element.select("div.chapter-item__name").first().text()
|
||||||
chapter.date_upload = SimpleDateFormat("dd.MM.yyyy", Locale.US)
|
chapter.date_upload = SimpleDateFormat("dd.MM.yyyy", Locale.US)
|
||||||
.parse(element.select("div.chapter-item__date").text()).time
|
.parse(element.select("div.chapter-item__date").text()).time
|
||||||
|
|
|
@ -2,16 +2,21 @@ package eu.kanade.tachiyomi.extension.ru.mangachan
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
|
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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.source.online.ParsedHttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
import eu.kanade.tachiyomi.util.asJsoup
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.Locale
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
class Mangachan : ParsedHttpSource() {
|
class Mangachan : ParsedHttpSource() {
|
||||||
|
|
||||||
|
@ -30,14 +35,13 @@ class Mangachan : ParsedHttpSource() {
|
||||||
override val client: OkHttpClient = network.client.newBuilder()
|
override val client: OkHttpClient = network.client.newBuilder()
|
||||||
.addNetworkInterceptor(rateLimitInterceptor).build()
|
.addNetworkInterceptor(rateLimitInterceptor).build()
|
||||||
|
|
||||||
|
|
||||||
override fun popularMangaRequest(page: Int): Request =
|
override fun popularMangaRequest(page: Int): Request =
|
||||||
GET("$baseUrl/mostfavorites?offset=${20 * (page - 1)}", headers)
|
GET("$baseUrl/mostfavorites?offset=${20 * (page - 1)}", headers)
|
||||||
|
|
||||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
||||||
var pageNum = 1
|
var pageNum = 1
|
||||||
when {
|
when {
|
||||||
page < 1 -> pageNum = 1
|
page < 1 -> pageNum = 1
|
||||||
page >= 1 -> pageNum = page
|
page >= 1 -> pageNum = page
|
||||||
}
|
}
|
||||||
val url = if (query.isNotEmpty()) {
|
val url = if (query.isNotEmpty()) {
|
||||||
|
@ -226,14 +230,12 @@ class Mangachan : ParsedHttpSource() {
|
||||||
arrayOf("Дата", "Популярность", "Имя", "Главы"),
|
arrayOf("Дата", "Популярность", "Имя", "Главы"),
|
||||||
Filter.Sort.Selection(1, false))
|
Filter.Sort.Selection(1, false))
|
||||||
|
|
||||||
|
|
||||||
override fun getFilterList() = FilterList(
|
override fun getFilterList() = FilterList(
|
||||||
Status(),
|
Status(),
|
||||||
OrderBy(),
|
OrderBy(),
|
||||||
GenreList(getGenreList())
|
GenreList(getGenreList())
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
/* [...document.querySelectorAll("li.sidetag > a:nth-child(1)")]
|
/* [...document.querySelectorAll("li.sidetag > a:nth-child(1)")]
|
||||||
* .map(el => `Genre("${el.getAttribute('href').substr(6)}")`).join(',\n')
|
* .map(el => `Genre("${el.getAttribute('href').substr(6)}")`).join(',\n')
|
||||||
* on https://mangachan.me/
|
* on https://mangachan.me/
|
||||||
|
|
|
@ -9,17 +9,17 @@ import eu.kanade.tachiyomi.source.model.Page
|
||||||
import eu.kanade.tachiyomi.source.model.SChapter
|
import eu.kanade.tachiyomi.source.model.SChapter
|
||||||
import eu.kanade.tachiyomi.source.model.SManga
|
import eu.kanade.tachiyomi.source.model.SManga
|
||||||
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.Locale
|
||||||
import okhttp3.FormBody
|
import okhttp3.FormBody
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.Locale
|
|
||||||
|
|
||||||
class Mangaclub : ParsedHttpSource() {
|
class Mangaclub : ParsedHttpSource() {
|
||||||
|
|
||||||
//Info
|
// Info
|
||||||
|
|
||||||
override val name: String = "MangaClub"
|
override val name: String = "MangaClub"
|
||||||
override val baseUrl: String = "https://mangaclub.ru"
|
override val baseUrl: String = "https://mangaclub.ru"
|
||||||
|
@ -27,7 +27,7 @@ class Mangaclub : ParsedHttpSource() {
|
||||||
override val supportsLatest: Boolean = true
|
override val supportsLatest: Boolean = true
|
||||||
override val client: OkHttpClient = network.cloudflareClient
|
override val client: OkHttpClient = network.cloudflareClient
|
||||||
|
|
||||||
//Popular
|
// Popular
|
||||||
|
|
||||||
override fun popularMangaRequest(page: Int): Request =
|
override fun popularMangaRequest(page: Int): Request =
|
||||||
GET("$baseUrl/f/order_by=news_read/order=desc/page/$page/", headers)
|
GET("$baseUrl/f/order_by=news_read/order=desc/page/$page/", headers)
|
||||||
|
@ -42,7 +42,7 @@ class Mangaclub : ParsedHttpSource() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Latest
|
// Latest
|
||||||
|
|
||||||
override fun latestUpdatesRequest(page: Int): Request = GET("$baseUrl/page/$page/", headers)
|
override fun latestUpdatesRequest(page: Int): Request = GET("$baseUrl/page/$page/", headers)
|
||||||
override fun latestUpdatesNextPageSelector(): String? = popularMangaNextPageSelector()
|
override fun latestUpdatesNextPageSelector(): String? = popularMangaNextPageSelector()
|
||||||
|
@ -50,7 +50,7 @@ class Mangaclub : ParsedHttpSource() {
|
||||||
override fun latestUpdatesFromElement(element: Element): SManga =
|
override fun latestUpdatesFromElement(element: Element): SManga =
|
||||||
popularMangaFromElement(element)
|
popularMangaFromElement(element)
|
||||||
|
|
||||||
//Search
|
// Search
|
||||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
||||||
if (query.isNotBlank()) {
|
if (query.isNotBlank()) {
|
||||||
val formBody = FormBody.Builder()
|
val formBody = FormBody.Builder()
|
||||||
|
@ -97,8 +97,7 @@ class Mangaclub : ParsedHttpSource() {
|
||||||
override fun searchMangaSelector(): String = popularMangaSelector()
|
override fun searchMangaSelector(): String = popularMangaSelector()
|
||||||
override fun searchMangaFromElement(element: Element): SManga = popularMangaFromElement(element)
|
override fun searchMangaFromElement(element: Element): SManga = popularMangaFromElement(element)
|
||||||
|
|
||||||
|
// Details
|
||||||
//Details
|
|
||||||
override fun mangaDetailsParse(document: Document): SManga = SManga.create().apply {
|
override fun mangaDetailsParse(document: Document): SManga = SManga.create().apply {
|
||||||
thumbnail_url = document.select("img[title].img-responsive").attr("abs:src")
|
thumbnail_url = document.select("img[title].img-responsive").attr("abs:src")
|
||||||
title = document.select(".title").text().substringBefore("/").trim()
|
title = document.select(".title").text().substringBefore("/").trim()
|
||||||
|
@ -113,7 +112,7 @@ class Mangaclub : ParsedHttpSource() {
|
||||||
genre = document.select("div.more-info a[href*=tags]").joinToString(", ") { it.text() }
|
genre = document.select("div.more-info a[href*=tags]").joinToString(", ") { it.text() }
|
||||||
}
|
}
|
||||||
|
|
||||||
//Chapters
|
// Chapters
|
||||||
override fun chapterListSelector(): String = ".chapter-main"
|
override fun chapterListSelector(): String = ".chapter-main"
|
||||||
|
|
||||||
override fun chapterFromElement(element: Element): SChapter = SChapter.create().apply {
|
override fun chapterFromElement(element: Element): SChapter = SChapter.create().apply {
|
||||||
|
@ -127,8 +126,7 @@ class Mangaclub : ParsedHttpSource() {
|
||||||
return SimpleDateFormat("dd.MM.yyyy", Locale.US).parse(date)?.time ?: 0
|
return SimpleDateFormat("dd.MM.yyyy", Locale.US).parse(date)?.time ?: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Pages
|
||||||
//Pages
|
|
||||||
override fun pageListParse(document: Document): List<Page> = mutableListOf<Page>().apply {
|
override fun pageListParse(document: Document): List<Page> = mutableListOf<Page>().apply {
|
||||||
document.select(".manga-lines-page a").forEach {
|
document.select(".manga-lines-page a").forEach {
|
||||||
add(Page(it.attr("data-p").toInt(), "", it.attr("abs:data-i")))
|
add(Page(it.attr("data-p").toInt(), "", it.attr("abs:data-i")))
|
||||||
|
@ -138,7 +136,7 @@ class Mangaclub : ParsedHttpSource() {
|
||||||
override fun imageUrlParse(document: Document): String =
|
override fun imageUrlParse(document: Document): String =
|
||||||
throw Exception("imageUrlParse Not Used")
|
throw Exception("imageUrlParse Not Used")
|
||||||
|
|
||||||
//Filters
|
// Filters
|
||||||
private class Categories(values: Array<Pair<String, String>>) :
|
private class Categories(values: Array<Pair<String, String>>) :
|
||||||
Filter.Select<String>("Категории", values.map { it.first }.toTypedArray())
|
Filter.Select<String>("Категории", values.map { it.first }.toTypedArray())
|
||||||
|
|
||||||
|
|
|
@ -7,13 +7,13 @@ import eu.kanade.tachiyomi.source.model.Page
|
||||||
import eu.kanade.tachiyomi.source.model.SChapter
|
import eu.kanade.tachiyomi.source.model.SChapter
|
||||||
import eu.kanade.tachiyomi.source.model.SManga
|
import eu.kanade.tachiyomi.source.model.SManga
|
||||||
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
import eu.kanade.tachiyomi.source.online.ParsedHttpSource
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.Locale
|
||||||
import okhttp3.Headers
|
import okhttp3.Headers
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
open class Mangahub : ParsedHttpSource() {
|
open class Mangahub : ParsedHttpSource() {
|
||||||
|
|
||||||
|
@ -30,7 +30,6 @@ open class Mangahub : ParsedHttpSource() {
|
||||||
override val client: OkHttpClient = network.client.newBuilder()
|
override val client: OkHttpClient = network.client.newBuilder()
|
||||||
.addNetworkInterceptor(rateLimitInterceptor).build()
|
.addNetworkInterceptor(rateLimitInterceptor).build()
|
||||||
|
|
||||||
|
|
||||||
override fun popularMangaRequest(page: Int): Request =
|
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)
|
GET("$baseUrl/explore?filter[sort]=rating&filter[dateStart][left_number]=1900&filter[dateStart][right_number]=2099&page=$page", headers)
|
||||||
|
|
||||||
|
|
|
@ -6,15 +6,20 @@ import com.github.salomonbrys.kotson.string
|
||||||
import com.google.gson.JsonObject
|
import com.google.gson.JsonObject
|
||||||
import com.google.gson.JsonParser
|
import com.google.gson.JsonParser
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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.source.online.ParsedHttpSource
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.Locale
|
||||||
import okhttp3.Headers
|
import okhttp3.Headers
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
class MangaOnlineBiz : ParsedHttpSource() {
|
class MangaOnlineBiz : ParsedHttpSource() {
|
||||||
override val name = "MangaOnlineBiz"
|
override val name = "MangaOnlineBiz"
|
||||||
|
@ -94,7 +99,6 @@ class MangaOnlineBiz : ParsedHttpSource() {
|
||||||
return manga
|
return manga
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
override fun latestUpdatesFromElement(element: Element): SManga =
|
override fun latestUpdatesFromElement(element: Element): SManga =
|
||||||
popularMangaFromElement(element)
|
popularMangaFromElement(element)
|
||||||
|
|
||||||
|
|
|
@ -3,17 +3,25 @@ package eu.kanade.tachiyomi.extension.ru.mintmanga
|
||||||
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
|
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.network.asObservableSuccess
|
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.source.online.ParsedHttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
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.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import rx.Observable
|
import rx.Observable
|
||||||
import java.text.ParseException
|
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.*
|
|
||||||
import java.util.regex.Pattern
|
|
||||||
|
|
||||||
class Mintmanga : ParsedHttpSource() {
|
class Mintmanga : ParsedHttpSource() {
|
||||||
|
|
||||||
|
|
|
@ -1,17 +1,20 @@
|
||||||
package eu.kanade.tachiyomi.extension.ru.nudemoon
|
package eu.kanade.tachiyomi.extension.ru.nudemoon
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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.source.online.ParsedHttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
import eu.kanade.tachiyomi.util.asJsoup
|
||||||
|
import java.net.URLEncoder
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.Locale
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.net.URLEncoder
|
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.Locale
|
|
||||||
|
|
||||||
|
|
||||||
class Nudemoon : ParsedHttpSource() {
|
class Nudemoon : ParsedHttpSource() {
|
||||||
|
|
||||||
|
@ -30,14 +33,14 @@ class Nudemoon : ParsedHttpSource() {
|
||||||
GET("$baseUrl/all_manga?date&rowstart=${30 * (page - 1)}", headers)
|
GET("$baseUrl/all_manga?date&rowstart=${30 * (page - 1)}", headers)
|
||||||
|
|
||||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
||||||
//Search by query on this site works really badly, i don't even sure of the need to implement it
|
// Search by query on this site works really badly, i don't even sure of the need to implement it
|
||||||
val url = if (query.isNotEmpty()) {
|
val url = if (query.isNotEmpty()) {
|
||||||
"$baseUrl/search?stext=${URLEncoder.encode(query, "CP1251")}&rowstart=${30 * (page - 1)}"
|
"$baseUrl/search?stext=${URLEncoder.encode(query, "CP1251")}&rowstart=${30 * (page - 1)}"
|
||||||
}else{
|
} else {
|
||||||
var genres = ""
|
var genres = ""
|
||||||
var order = ""
|
var order = ""
|
||||||
for (filter in if (filters.isEmpty()) getFilterList() else filters) {
|
for (filter in if (filters.isEmpty()) getFilterList() else filters) {
|
||||||
when(filter){
|
when (filter) {
|
||||||
is GenreList -> {
|
is GenreList -> {
|
||||||
filter.state.forEach { f ->
|
filter.state.forEach { f ->
|
||||||
if (f.state) {
|
if (f.state) {
|
||||||
|
@ -52,17 +55,17 @@ class Nudemoon : ParsedHttpSource() {
|
||||||
for (filter in filters) {
|
for (filter in filters) {
|
||||||
when (filter) {
|
when (filter) {
|
||||||
is OrderBy -> {
|
is OrderBy -> {
|
||||||
//The site has no ascending order
|
// The site has no ascending order
|
||||||
order = arrayOf("&date", "&views", "&like")[filter.state!!.index]
|
order = arrayOf("&date", "&views", "&like")[filter.state!!.index]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
"$baseUrl/tags/${genres.dropLast(1)}$order&rowstart=${30 * (page - 1)}"
|
"$baseUrl/tags/${genres.dropLast(1)}$order&rowstart=${30 * (page - 1)}"
|
||||||
}else{
|
} else {
|
||||||
for (filter in filters) {
|
for (filter in filters) {
|
||||||
when (filter) {
|
when (filter) {
|
||||||
is OrderBy -> {
|
is OrderBy -> {
|
||||||
//The site has no ascending order
|
// The site has no ascending order
|
||||||
order = arrayOf("all_manga?date", "all_manga?views", "all_manga?like")[filter.state!!.index]
|
order = arrayOf("all_manga?date", "all_manga?views", "all_manga?like")[filter.state!!.index]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -83,7 +86,7 @@ class Nudemoon : ParsedHttpSource() {
|
||||||
val manga = SManga.create()
|
val manga = SManga.create()
|
||||||
|
|
||||||
manga.thumbnail_url = element.select("img[class^=news]").attr("abs:src")
|
manga.thumbnail_url = element.select("img[class^=news]").attr("abs:src")
|
||||||
element.select("a:has(h2)").let{
|
element.select("a:has(h2)").let {
|
||||||
manga.title = it.text()
|
manga.title = it.text()
|
||||||
manga.setUrlWithoutDomain(it.attr("href"))
|
manga.setUrlWithoutDomain(it.attr("href"))
|
||||||
}
|
}
|
||||||
|
@ -115,7 +118,7 @@ class Nudemoon : ParsedHttpSource() {
|
||||||
|
|
||||||
override fun chapterListRequest(manga: SManga): Request {
|
override fun chapterListRequest(manga: SManga): Request {
|
||||||
|
|
||||||
val chapterUrl = if(manga.title.contains("\\s#\\d+".toRegex()))
|
val chapterUrl = if (manga.title.contains("\\s#\\d+".toRegex()))
|
||||||
"/vse_glavy/" + manga.title.split("\\s#\\d+".toRegex())[0].replace("\\W".toRegex(), "_")
|
"/vse_glavy/" + manga.title.split("\\s#\\d+".toRegex())[0].replace("\\W".toRegex(), "_")
|
||||||
else
|
else
|
||||||
manga.url
|
manga.url
|
||||||
|
@ -129,11 +132,11 @@ class Nudemoon : ParsedHttpSource() {
|
||||||
val responseUrl = response.request().url().toString()
|
val responseUrl = response.request().url().toString()
|
||||||
val document = response.asJsoup()
|
val document = response.asJsoup()
|
||||||
|
|
||||||
if(!responseUrl.contains("/vse_glavy/")){
|
if (!responseUrl.contains("/vse_glavy/")) {
|
||||||
return listOf(chapterFromElement(document))
|
return listOf(chapterFromElement(document))
|
||||||
}
|
}
|
||||||
|
|
||||||
//Order chapters by its number 'cause on the site they are in random order
|
// Order chapters by its number 'cause on the site they are in random order
|
||||||
return document.select(chapterListSelector()).sortedByDescending {
|
return document.select(chapterListSelector()).sortedByDescending {
|
||||||
val regex = "#(\\d+)".toRegex()
|
val regex = "#(\\d+)".toRegex()
|
||||||
val chapterName = it.select("img[class^=news]").first().parent().attr("title")
|
val chapterName = it.select("img[class^=news]").first().parent().attr("title")
|
||||||
|
@ -147,13 +150,13 @@ class Nudemoon : ParsedHttpSource() {
|
||||||
val infoElem = element.select("tr[valign=top]").first().parent()
|
val infoElem = element.select("tr[valign=top]").first().parent()
|
||||||
val chapterName = infoElem.select("h1, h2").text()
|
val chapterName = infoElem.select("h1, h2").text()
|
||||||
var chapterUrl = infoElem.select("a[title]:has(img)").attr("href")
|
var chapterUrl = infoElem.select("a[title]:has(img)").attr("href")
|
||||||
if(!chapterUrl.contains("-online")) {
|
if (!chapterUrl.contains("-online")) {
|
||||||
chapterUrl = chapterUrl.replace("/\\d+".toRegex(), "$0-online")
|
chapterUrl = chapterUrl.replace("/\\d+".toRegex(), "$0-online")
|
||||||
} else {
|
} else {
|
||||||
chapter.chapter_number = 1F
|
chapter.chapter_number = 1F
|
||||||
}
|
}
|
||||||
|
|
||||||
chapter.setUrlWithoutDomain(if(!chapterUrl.startsWith("/")) "/$chapterUrl" else chapterUrl)
|
chapter.setUrlWithoutDomain(if (!chapterUrl.startsWith("/")) "/$chapterUrl" else chapterUrl)
|
||||||
chapter.name = chapterName
|
chapter.name = chapterName
|
||||||
chapter.date_upload = infoElem.text().substringAfter("Дата:").substringBefore("Просмотров").trim().let {
|
chapter.date_upload = infoElem.text().substringAfter("Дата:").substringBefore("Просмотров").trim().let {
|
||||||
try {
|
try {
|
||||||
|
@ -172,7 +175,6 @@ class Nudemoon : ParsedHttpSource() {
|
||||||
return Regex("""images\[(\d+)].src\s=\s'(http.*)'""").findAll(imgScript).map {
|
return Regex("""images\[(\d+)].src\s=\s'(http.*)'""").findAll(imgScript).map {
|
||||||
Page(it.groupValues[1].toInt(), imageUrl = it.groupValues[2])
|
Page(it.groupValues[1].toInt(), imageUrl = it.groupValues[2])
|
||||||
}.toList()
|
}.toList()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun imageUrlParse(document: Document) = throw Exception("Not Used")
|
override fun imageUrlParse(document: Document) = throw Exception("Not Used")
|
||||||
|
|
|
@ -1,19 +1,23 @@
|
||||||
package eu.kanade.tachiyomi.extension.ru.onlinecomics
|
package eu.kanade.tachiyomi.extension.ru.onlinecomics
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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.source.online.ParsedHttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
import eu.kanade.tachiyomi.util.asJsoup
|
||||||
|
import java.text.SimpleDateFormat
|
||||||
|
import java.util.Locale
|
||||||
import okhttp3.Headers
|
import okhttp3.Headers
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
import org.jsoup.Jsoup
|
import org.jsoup.Jsoup
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.*
|
|
||||||
|
|
||||||
class Onlinecomics: ParsedHttpSource() {
|
class Onlinecomics : ParsedHttpSource() {
|
||||||
override fun searchMangaFromElement(element: Element): SManga {
|
override fun searchMangaFromElement(element: Element): SManga {
|
||||||
throw Exception("Not used")
|
throw Exception("Not used")
|
||||||
}
|
}
|
||||||
|
@ -65,7 +69,6 @@ class Onlinecomics: ParsedHttpSource() {
|
||||||
popularMangaFromElement(element)
|
popularMangaFromElement(element)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
val hasNextPage = popularMangaNextPageSelector().let { selector ->
|
val hasNextPage = popularMangaNextPageSelector().let { selector ->
|
||||||
document.select(selector).first()
|
document.select(selector).first()
|
||||||
} != null
|
} != null
|
||||||
|
@ -108,13 +111,12 @@ class Onlinecomics: ParsedHttpSource() {
|
||||||
.joinToString("/", limit = 4, truncated = "")
|
.joinToString("/", limit = 4, truncated = "")
|
||||||
.removeSuffix("/")
|
.removeSuffix("/")
|
||||||
manga.setUrlWithoutDomain(newUrl)
|
manga.setUrlWithoutDomain(newUrl)
|
||||||
manga.title = element.select("yass-span").text().split('/')[0]
|
manga.title = element.select("yass-span").text().split('/')[0]
|
||||||
mangaList.add(manga)
|
mangaList.add(manga)
|
||||||
}
|
}
|
||||||
|
|
||||||
val result = mangaList.filter { it.url.isNotEmpty() }.distinctBy { it.url }
|
val result = mangaList.filter { it.url.isNotEmpty() }.distinctBy { it.url }
|
||||||
return MangasPage(result, false)
|
return MangasPage(result, false)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun mangaDetailsParse(document: Document): SManga {
|
override fun mangaDetailsParse(document: Document): SManga {
|
||||||
|
@ -134,7 +136,7 @@ class Onlinecomics: ParsedHttpSource() {
|
||||||
"Жанры:"
|
"Жанры:"
|
||||||
}
|
}
|
||||||
val end = "Тип:"
|
val end = "Тип:"
|
||||||
val tempString = text.removeRange(0, text.indexOf(begin)+begin.length)
|
val tempString = text.removeRange(0, text.indexOf(begin) + begin.length)
|
||||||
manga.genre = tempString.removeRange(tempString.indexOf(end), tempString.length).trim()
|
manga.genre = tempString.removeRange(tempString.indexOf(end), tempString.length).trim()
|
||||||
|
|
||||||
manga.status = parseStatus(infoElement.text())
|
manga.status = parseStatus(infoElement.text())
|
||||||
|
@ -146,7 +148,6 @@ class Onlinecomics: ParsedHttpSource() {
|
||||||
manga.description = document.select(".remark").text()
|
manga.description = document.select(".remark").text()
|
||||||
}
|
}
|
||||||
return manga
|
return manga
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun parseStatus(element: String): Int = when {
|
private fun parseStatus(element: String): Int = when {
|
||||||
|
@ -160,7 +161,6 @@ class Onlinecomics: ParsedHttpSource() {
|
||||||
val chapterList = mutableListOf<SChapter>()
|
val chapterList = mutableListOf<SChapter>()
|
||||||
chapterList.addAll(document.select(chapterListSelector()).map { chapterFromElement(it) })
|
chapterList.addAll(document.select(chapterListSelector()).map { chapterFromElement(it) })
|
||||||
|
|
||||||
|
|
||||||
val lastPage: String? = document.select("div.navigationG .C").last()?.text()
|
val lastPage: String? = document.select("div.navigationG .C").last()?.text()
|
||||||
if (lastPage != null) {
|
if (lastPage != null) {
|
||||||
(2..lastPage.toInt()).forEach { i ->
|
(2..lastPage.toInt()).forEach { i ->
|
||||||
|
@ -220,4 +220,4 @@ class Onlinecomics: ParsedHttpSource() {
|
||||||
}.build()
|
}.build()
|
||||||
return GET(page.imageUrl!!, imgHeader)
|
return GET(page.imageUrl!!, imgHeader)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,17 +3,25 @@ package eu.kanade.tachiyomi.extension.ru.readmanga
|
||||||
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
|
import eu.kanade.tachiyomi.lib.ratelimit.RateLimitInterceptor
|
||||||
import eu.kanade.tachiyomi.network.GET
|
import eu.kanade.tachiyomi.network.GET
|
||||||
import eu.kanade.tachiyomi.network.asObservableSuccess
|
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.source.online.ParsedHttpSource
|
||||||
import eu.kanade.tachiyomi.util.asJsoup
|
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.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import rx.Observable
|
import rx.Observable
|
||||||
import java.text.ParseException
|
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.*
|
|
||||||
import java.util.regex.Pattern
|
|
||||||
|
|
||||||
class Readmanga : ParsedHttpSource() {
|
class Readmanga : ParsedHttpSource() {
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,6 @@ import okhttp3.Response
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
|
|
||||||
|
|
||||||
class RisensTeam : ParsedHttpSource() {
|
class RisensTeam : ParsedHttpSource() {
|
||||||
override fun pageListParse(document: Document): List<Page> = throw Exception("Not Used")
|
override fun pageListParse(document: Document): List<Page> = throw Exception("Not Used")
|
||||||
|
|
||||||
|
@ -37,18 +36,18 @@ class RisensTeam : ParsedHttpSource() {
|
||||||
override fun popularMangaRequest(page: Int): Request =
|
override fun popularMangaRequest(page: Int): Request =
|
||||||
GET("$baseUrl/manga/page/$page/", headers)
|
GET("$baseUrl/manga/page/$page/", headers)
|
||||||
|
|
||||||
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request{
|
override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request {
|
||||||
return POST(baseUrl, headers, buildRequestBody(query, page))
|
return POST(baseUrl, headers, buildRequestBody(query, page))
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun buildRequestBody(query: String, page: Int): RequestBody{
|
private fun buildRequestBody(query: String, page: Int): RequestBody {
|
||||||
return MultipartBody.Builder()
|
return MultipartBody.Builder()
|
||||||
.setType(MultipartBody.FORM)
|
.setType(MultipartBody.FORM)
|
||||||
.addFormDataPart("do", "search")
|
.addFormDataPart("do", "search")
|
||||||
.addFormDataPart("subaction", "search")
|
.addFormDataPart("subaction", "search")
|
||||||
.addFormDataPart("story", query)
|
.addFormDataPart("story", query)
|
||||||
.addFormDataPart("catlist[]", "33")
|
.addFormDataPart("catlist[]", "33")
|
||||||
.addFormDataPart("search_start", (page-1).toString())
|
.addFormDataPart("search_start", (page - 1).toString())
|
||||||
.build()
|
.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,7 +59,7 @@ class RisensTeam : ParsedHttpSource() {
|
||||||
val manga = SManga.create()
|
val manga = SManga.create()
|
||||||
val coverElem = element.select(".card-img-top").first()
|
val coverElem = element.select(".card-img-top").first()
|
||||||
val imgUrl = coverElem.attr("src")
|
val imgUrl = coverElem.attr("src")
|
||||||
manga.thumbnail_url = baseUrl + if(imgUrl.contains("/pagespeed_static/")) coverElem.attr("data-pagespeed-lazy-src") else imgUrl
|
manga.thumbnail_url = baseUrl + if (imgUrl.contains("/pagespeed_static/")) coverElem.attr("data-pagespeed-lazy-src") else imgUrl
|
||||||
manga.setUrlWithoutDomain(element.select("b-link").first().attr("to"))
|
manga.setUrlWithoutDomain(element.select("b-link").first().attr("to"))
|
||||||
manga.title = coverElem.attr("alt").split('/').first().replace("(Манга)", "").trim()
|
manga.title = coverElem.attr("alt").split('/').first().replace("(Манга)", "").trim()
|
||||||
|
|
||||||
|
@ -86,7 +85,7 @@ class RisensTeam : ParsedHttpSource() {
|
||||||
manga.thumbnail_url = baseUrl + document.select("b-img[fluid]").first().attr("src")
|
manga.thumbnail_url = baseUrl + document.select("b-img[fluid]").first().attr("src")
|
||||||
manga.genre = document.select("td:containsOwn(Жанр:) + td > a").joinToString { it.ownText() }
|
manga.genre = document.select("td:containsOwn(Жанр:) + td > a").joinToString { it.ownText() }
|
||||||
manga.description = document.select(".news-body").text()
|
manga.description = document.select(".news-body").text()
|
||||||
manga.status = when(document.select("td:containsOwn(Состояние:) + td").first().ownText()){
|
manga.status = when (document.select("td:containsOwn(Состояние:) + td").first().ownText()) {
|
||||||
"Выход продолжается" -> SManga.ONGOING
|
"Выход продолжается" -> SManga.ONGOING
|
||||||
"Выход завершён", "Выход завершен" -> SManga.COMPLETED
|
"Выход завершён", "Выход завершен" -> SManga.COMPLETED
|
||||||
else -> SManga.UNKNOWN
|
else -> SManga.UNKNOWN
|
||||||
|
|
|
@ -1,18 +1,22 @@
|
||||||
package eu.kanade.tachiyomi.extension.ru.selfmanga
|
package eu.kanade.tachiyomi.extension.ru.selfmanga
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.network.GET
|
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.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.Headers
|
||||||
import okhttp3.HttpUrl
|
import okhttp3.HttpUrl
|
||||||
import okhttp3.Request
|
import okhttp3.Request
|
||||||
import okhttp3.Response
|
import okhttp3.Response
|
||||||
import org.jsoup.nodes.Document
|
import org.jsoup.nodes.Document
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
import java.text.ParseException
|
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.*
|
|
||||||
import java.util.regex.Pattern
|
|
||||||
|
|
||||||
class Selfmanga : ParsedHttpSource() {
|
class Selfmanga : ParsedHttpSource() {
|
||||||
|
|
||||||
|
@ -196,7 +200,6 @@ class Selfmanga : ParsedHttpSource() {
|
||||||
GenreList(getGenreList())
|
GenreList(getGenreList())
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
private fun getCategoryList() = listOf(
|
private fun getCategoryList() = listOf(
|
||||||
Genre("Артбук", "el_5894"),
|
Genre("Артбук", "el_5894"),
|
||||||
Genre("Веб", "el_2160"),
|
Genre("Веб", "el_2160"),
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package eu.kanade.tachiyomi.extension.th.nekopost
|
package eu.kanade.tachiyomi.extension.th.nekopost
|
||||||
|
|
||||||
import org.jsoup.nodes.Element
|
|
||||||
import java.text.SimpleDateFormat
|
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) {
|
class NPArrayList<E>(c: Collection<E>, val mangaList: List<Element>) : ArrayList<E>(c) {
|
||||||
override fun isEmpty(): Boolean = mangaList.isEmpty()
|
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 isListEmpty(): Boolean = super.isEmpty()
|
||||||
|
|
||||||
fun isListNotEmpty(): Boolean = !isListEmpty()
|
fun isListNotEmpty(): Boolean = !isListEmpty()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
object NPUtils {
|
object NPUtils {
|
||||||
private val urlWithoutDomainFromFullUrlRegex: Regex = Regex("^https://www\\.nekopost\\.net/manga/(.*)$")
|
private val urlWithoutDomainFromFullUrlRegex: Regex = Regex("^https://www\\.nekopost\\.net/manga/(.*)$")
|
||||||
|
|
||||||
|
|
||||||
fun getMangaOrChapterAlias(url: String): String {
|
fun getMangaOrChapterAlias(url: String): String {
|
||||||
val (urlWithoutDomain) = urlWithoutDomainFromFullUrlRegex.find(url)!!.destructured
|
val (urlWithoutDomain) = urlWithoutDomainFromFullUrlRegex.find(url)!!.destructured
|
||||||
return urlWithoutDomain
|
return urlWithoutDomain
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue