parent
65f0403ccb
commit
b993afac8d
|
@ -5,7 +5,7 @@ ext {
|
||||||
appName = 'Tachiyomi: Mangá Livre'
|
appName = 'Tachiyomi: Mangá Livre'
|
||||||
pkgNameSuffix = 'pt.mangalivre'
|
pkgNameSuffix = 'pt.mangalivre'
|
||||||
extClass = '.MangaLivre'
|
extClass = '.MangaLivre'
|
||||||
extVersionCode = 1
|
extVersionCode = 2
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,18 +24,19 @@ import java.util.concurrent.TimeUnit
|
||||||
class MangaLivre : HttpSource() {
|
class MangaLivre : HttpSource() {
|
||||||
override val name = "MangaLivre"
|
override val name = "MangaLivre"
|
||||||
|
|
||||||
override val baseUrl = "https://mangalivre.com/"
|
override val baseUrl = "https://mangalivre.com"
|
||||||
|
|
||||||
override val lang = "pt"
|
override val lang = "pt"
|
||||||
|
|
||||||
override val supportsLatest = true
|
override val supportsLatest = true
|
||||||
|
|
||||||
// Sometimes the site is slow.
|
// Sometimes the site is slow.
|
||||||
override val client = network.client.newBuilder()
|
override val client =
|
||||||
|
network.client.newBuilder()
|
||||||
.connectTimeout(1, TimeUnit.MINUTES)
|
.connectTimeout(1, TimeUnit.MINUTES)
|
||||||
.readTimeout(1, TimeUnit.MINUTES)
|
.readTimeout(1, TimeUnit.MINUTES)
|
||||||
.writeTimeout(1, TimeUnit.MINUTES)
|
.writeTimeout(1, TimeUnit.MINUTES)
|
||||||
.build()!!
|
.build()
|
||||||
|
|
||||||
private val catalogHeaders = Headers.Builder().apply {
|
private val catalogHeaders = Headers.Builder().apply {
|
||||||
add("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")
|
add("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")
|
||||||
|
@ -244,7 +245,7 @@ class MangaLivre : HttpSource() {
|
||||||
val cName = obj["chapter_name"]!!.asString
|
val cName = obj["chapter_name"]!!.asString
|
||||||
|
|
||||||
return SChapter.create().apply {
|
return SChapter.create().apply {
|
||||||
name = if (cName == "") "Capítulo " + obj["number"]!!.asString else cName
|
name = "Cap. ${obj["number"]!!.asString}" + (if (cName == "") "" else " - $cName")
|
||||||
date_upload = parseChapterDate(obj["date"].nullString)
|
date_upload = parseChapterDate(obj["date"].nullString)
|
||||||
scanlator = scan["scanlators"]!!.asJsonArray.get(0)!!.asJsonObject["name"].nullString
|
scanlator = scan["scanlators"]!!.asJsonArray.get(0)!!.asJsonObject["name"].nullString
|
||||||
url = scan["link"]!!.nullString ?: ""
|
url = scan["link"]!!.nullString ?: ""
|
||||||
|
@ -254,7 +255,7 @@ class MangaLivre : HttpSource() {
|
||||||
|
|
||||||
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/yy", Locale.ENGLISH).parse(date).time
|
||||||
} catch (e: ParseException) {
|
} catch (e: ParseException) {
|
||||||
0L
|
0L
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ ext {
|
||||||
appName = 'Tachiyomi: mangásPROJECT'
|
appName = 'Tachiyomi: mangásPROJECT'
|
||||||
pkgNameSuffix = 'pt.mangasproject'
|
pkgNameSuffix = 'pt.mangasproject'
|
||||||
extClass = '.MangasProject'
|
extClass = '.MangasProject'
|
||||||
extVersionCode = 1
|
extVersionCode = 2
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,11 +31,12 @@ class MangasProject : HttpSource() {
|
||||||
override val supportsLatest = true
|
override val supportsLatest = true
|
||||||
|
|
||||||
// Sometimes the site is slow.
|
// Sometimes the site is slow.
|
||||||
override val client = network.client.newBuilder()
|
override val client =
|
||||||
|
network.client.newBuilder()
|
||||||
.connectTimeout(1, TimeUnit.MINUTES)
|
.connectTimeout(1, TimeUnit.MINUTES)
|
||||||
.readTimeout(1, TimeUnit.MINUTES)
|
.readTimeout(1, TimeUnit.MINUTES)
|
||||||
.writeTimeout(1, TimeUnit.MINUTES)
|
.writeTimeout(1, TimeUnit.MINUTES)
|
||||||
.build()!!
|
.build()
|
||||||
|
|
||||||
private val catalogHeaders = Headers.Builder().apply {
|
private val catalogHeaders = Headers.Builder().apply {
|
||||||
add("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")
|
add("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")
|
||||||
|
@ -244,7 +245,7 @@ class MangasProject : HttpSource() {
|
||||||
val cName = obj["chapter_name"]!!.asString
|
val cName = obj["chapter_name"]!!.asString
|
||||||
|
|
||||||
return SChapter.create().apply {
|
return SChapter.create().apply {
|
||||||
name = if (cName == "") "Capítulo " + obj["number"]!!.asString else cName
|
name = "Cap. ${obj["number"]!!.asString}" + (if (cName == "") "" else " - $cName")
|
||||||
date_upload = parseChapterDate(obj["date"].nullString)
|
date_upload = parseChapterDate(obj["date"].nullString)
|
||||||
scanlator = scan["scanlators"]!!.asJsonArray.get(0)!!.asJsonObject["name"].nullString
|
scanlator = scan["scanlators"]!!.asJsonArray.get(0)!!.asJsonObject["name"].nullString
|
||||||
url = scan["link"]!!.nullString ?: ""
|
url = scan["link"]!!.nullString ?: ""
|
||||||
|
@ -254,7 +255,7 @@ class MangasProject : HttpSource() {
|
||||||
|
|
||||||
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/yy", Locale.ENGLISH).parse(date).time
|
||||||
} catch (e: ParseException) {
|
} catch (e: ParseException) {
|
||||||
0L
|
0L
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ ext {
|
||||||
appName = 'Tachiyomi: Union Mangás'
|
appName = 'Tachiyomi: Union Mangás'
|
||||||
pkgNameSuffix = 'pt.unionmangas'
|
pkgNameSuffix = 'pt.unionmangas'
|
||||||
extClass = '.UnionMangas'
|
extClass = '.UnionMangas'
|
||||||
extVersionCode = 4
|
extVersionCode = 5
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,13 +21,13 @@ class UnionMangas : ParsedHttpSource() {
|
||||||
|
|
||||||
override val name = "Union Mangás"
|
override val name = "Union Mangás"
|
||||||
|
|
||||||
override val baseUrl = "http://unionmangas.top"
|
override val baseUrl = "https://unionmangas.top"
|
||||||
|
|
||||||
override val lang = "pt"
|
override val lang = "pt"
|
||||||
|
|
||||||
override val supportsLatest = true
|
override val supportsLatest = true
|
||||||
|
|
||||||
// Sometimes the site it's very slow...
|
// Sometimes the site is very slow.
|
||||||
override val client =
|
override val client =
|
||||||
network.client.newBuilder()
|
network.client.newBuilder()
|
||||||
.connectTimeout(3, TimeUnit.MINUTES)
|
.connectTimeout(3, TimeUnit.MINUTES)
|
||||||
|
@ -35,8 +35,6 @@ class UnionMangas : ParsedHttpSource() {
|
||||||
.writeTimeout(3, TimeUnit.MINUTES)
|
.writeTimeout(3, TimeUnit.MINUTES)
|
||||||
.build()
|
.build()
|
||||||
|
|
||||||
private val langRegex: String = "( )?\\(Pt-Br\\)"
|
|
||||||
|
|
||||||
private val catalogHeaders = Headers.Builder().apply {
|
private val catalogHeaders = Headers.Builder().apply {
|
||||||
add("User-Agent", "Mozilla/5.0 (Windows NT 6.3; WOW64)")
|
add("User-Agent", "Mozilla/5.0 (Windows NT 6.3; WOW64)")
|
||||||
add("Host", "unionmangas.top")
|
add("Host", "unionmangas.top")
|
||||||
|
@ -55,7 +53,7 @@ class UnionMangas : ParsedHttpSource() {
|
||||||
manga.thumbnail_url = element.select("a img").first()?.attr("src")
|
manga.thumbnail_url = element.select("a img").first()?.attr("src")
|
||||||
element.select("a").last().let {
|
element.select("a").last().let {
|
||||||
manga.setUrlWithoutDomain(it.attr("href"))
|
manga.setUrlWithoutDomain(it.attr("href"))
|
||||||
manga.title = it.text().replace(langRegex.toRegex(), "")
|
manga.title = it.text().replace(LANG_REGEX.toRegex(), "")
|
||||||
}
|
}
|
||||||
|
|
||||||
return manga
|
return manga
|
||||||
|
@ -63,7 +61,7 @@ class UnionMangas : ParsedHttpSource() {
|
||||||
|
|
||||||
override fun popularMangaNextPageSelector() = ".pagination li:contains(Next)"
|
override fun popularMangaNextPageSelector() = ".pagination li:contains(Next)"
|
||||||
|
|
||||||
override fun latestUpdatesSelector() = "div.row[style=margin-bottom: 10px;] > div.col-md-12"
|
override fun latestUpdatesSelector() = "div.row[style] div.col-md-12[style]"
|
||||||
|
|
||||||
override fun latestUpdatesRequest(page: Int): Request {
|
override fun latestUpdatesRequest(page: Int): Request {
|
||||||
val form = FormBody.Builder().apply {
|
val form = FormBody.Builder().apply {
|
||||||
|
@ -74,7 +72,16 @@ class UnionMangas : ParsedHttpSource() {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun latestUpdatesFromElement(element: Element): SManga {
|
override fun latestUpdatesFromElement(element: Element): SManga {
|
||||||
return popularMangaFromElement(element)
|
// return popularMangaFromElement(element)
|
||||||
|
val manga = SManga.create()
|
||||||
|
val infoElements = element.select("a.link-titulo")
|
||||||
|
manga.thumbnail_url = infoElements.first()?.select("img")?.attr("src")
|
||||||
|
infoElements.last().let {
|
||||||
|
manga.setUrlWithoutDomain(it.attr("href"))
|
||||||
|
manga.title = it.text().replace(LANG_REGEX.toRegex(), "")
|
||||||
|
}
|
||||||
|
|
||||||
|
return manga
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun latestUpdatesNextPageSelector() = "div#linha-botao-mais"
|
override fun latestUpdatesNextPageSelector() = "div#linha-botao-mais"
|
||||||
|
@ -87,11 +94,11 @@ class UnionMangas : ParsedHttpSource() {
|
||||||
|
|
||||||
override fun searchMangaFromElement(element: Element): SManga {
|
override fun searchMangaFromElement(element: Element): SManga {
|
||||||
val manga = SManga.create()
|
val manga = SManga.create()
|
||||||
|
val thumbnailElement = element.select("a img.img-thumbnail").first()
|
||||||
manga.thumbnail_url = element.select("a img.img-thumbnail").first().attr("src")
|
manga.thumbnail_url = thumbnailElement.attr("src").replace("com.br", "top")
|
||||||
element.select("a").last().let {
|
element.select("a").last().let {
|
||||||
manga.setUrlWithoutDomain(it.attr("href"))
|
manga.setUrlWithoutDomain(it.attr("href"))
|
||||||
manga.title = it.text().replace(langRegex.toRegex(), "")
|
manga.title = it.text().replace(LANG_REGEX.toRegex(), "")
|
||||||
}
|
}
|
||||||
|
|
||||||
return manga
|
return manga
|
||||||
|
@ -119,7 +126,7 @@ class UnionMangas : ParsedHttpSource() {
|
||||||
manga.thumbnail_url = infoElement.select(".img-thumbnail").first()?.attr("src")
|
manga.thumbnail_url = infoElement.select(".img-thumbnail").first()?.attr("src")
|
||||||
|
|
||||||
// Need to grab title again because the ellipsize in search.
|
// Need to grab title again because the ellipsize in search.
|
||||||
manga.title = infoElement.select("h2").first()!!.text().replace(langRegex.toRegex(), "")
|
manga.title = infoElement.select("h2").first()!!.text().replace(LANG_REGEX.toRegex(), "")
|
||||||
|
|
||||||
return manga
|
return manga
|
||||||
}
|
}
|
||||||
|
@ -166,4 +173,8 @@ class UnionMangas : ParsedHttpSource() {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun imageUrlParse(document: Document) = ""
|
override fun imageUrlParse(document: Document) = ""
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
private const val LANG_REGEX = "( )?\\(Pt-Br\\)"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue