[RU] ReadManga / MintManga / AllHentai: Added Scanlator, Data upload, Author (#6402)
(cherry picked from commit 0a2a5103a461c6db1f3ef9196ec68cfaa2e42af7)
This commit is contained in:
parent
b2d8775f19
commit
c9962e5005
|
@ -5,7 +5,7 @@ ext {
|
||||||
extName = 'AllHentai'
|
extName = 'AllHentai'
|
||||||
pkgNameSuffix = 'ru.allhentai'
|
pkgNameSuffix = 'ru.allhentai'
|
||||||
extClass = '.AllHentai'
|
extClass = '.AllHentai'
|
||||||
extVersionCode = 2
|
extVersionCode = 3
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
containsNsfw = true
|
containsNsfw = true
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,7 +99,11 @@ class AllHentai : ParsedHttpSource() {
|
||||||
}
|
}
|
||||||
|
|
||||||
val manga = SManga.create()
|
val manga = SManga.create()
|
||||||
manga.author = infoElement.select("span.elem_author").first()?.text()
|
var authorElement = infoElement.select("span.elem_author").first()?.text()
|
||||||
|
if (authorElement == null) {
|
||||||
|
authorElement = infoElement.select("span.elem_screenwriter").first()?.text()
|
||||||
|
}
|
||||||
|
manga.author = authorElement
|
||||||
manga.artist = infoElement.select("span.elem_illustrator").first()?.text()
|
manga.artist = infoElement.select("span.elem_illustrator").first()?.text()
|
||||||
manga.genre = infoElement.select("span.elem_genre").text().split(",").plusElement(category).joinToString { it.trim() }
|
manga.genre = infoElement.select("span.elem_genre").text().split(",").plusElement(category).joinToString { it.trim() }
|
||||||
manga.description = infoElement.select("div.manga-description").text()
|
manga.description = infoElement.select("div.manga-description").text()
|
||||||
|
@ -141,6 +145,15 @@ class AllHentai : ParsedHttpSource() {
|
||||||
val chapter = SChapter.create()
|
val chapter = SChapter.create()
|
||||||
chapter.setUrlWithoutDomain(urlElement.attr("href") + "?mtr=1")
|
chapter.setUrlWithoutDomain(urlElement.attr("href") + "?mtr=1")
|
||||||
|
|
||||||
|
var translators = ""
|
||||||
|
val translatorElement = urlElement.attr("title")
|
||||||
|
if (!translatorElement.isNullOrBlank()) {
|
||||||
|
translators = translatorElement
|
||||||
|
.replace("(Переводчик),", "&")
|
||||||
|
.removeSuffix(" (Переводчик)")
|
||||||
|
}
|
||||||
|
chapter.scanlator = translators
|
||||||
|
|
||||||
chapter.name = urlText.removeSuffix(" новое").trim()
|
chapter.name = urlText.removeSuffix(" новое").trim()
|
||||||
if (manga.title.length > 25) {
|
if (manga.title.length > 25) {
|
||||||
for (word in manga.title.split(' ')) {
|
for (word in manga.title.split(' ')) {
|
||||||
|
@ -154,11 +167,11 @@ class AllHentai : ParsedHttpSource() {
|
||||||
chapter.name = chapter.name.substringAfter("…").trim()
|
chapter.name = chapter.name.substringAfter("…").trim()
|
||||||
}
|
}
|
||||||
|
|
||||||
chapter.date_upload = element.select("td.hidden-xxs").last()?.text()?.let {
|
chapter.date_upload = element.select("td.d-none").last()?.text()?.let {
|
||||||
try {
|
try {
|
||||||
SimpleDateFormat("dd.MM.yy", Locale.US).parse(it).time
|
SimpleDateFormat("dd.MM.yy", Locale.US).parse(it)?.time ?: 0L
|
||||||
} catch (e: ParseException) {
|
} catch (e: ParseException) {
|
||||||
SimpleDateFormat("dd/MM/yy", Locale.US).parse(it).time
|
SimpleDateFormat("dd/MM/yy", Locale.US).parse(it)?.time ?: 0L
|
||||||
}
|
}
|
||||||
} ?: 0
|
} ?: 0
|
||||||
return chapter
|
return chapter
|
||||||
|
|
|
@ -5,7 +5,7 @@ ext {
|
||||||
extName = 'Mintmanga'
|
extName = 'Mintmanga'
|
||||||
pkgNameSuffix = 'ru.mintmanga'
|
pkgNameSuffix = 'ru.mintmanga'
|
||||||
extClass = '.Mintmanga'
|
extClass = '.Mintmanga'
|
||||||
extVersionCode = 24
|
extVersionCode = 25
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -106,7 +106,11 @@ class Mintmanga : ParsedHttpSource() {
|
||||||
}
|
}
|
||||||
|
|
||||||
val manga = SManga.create()
|
val manga = SManga.create()
|
||||||
manga.author = infoElement.select("span.elem_author").first()?.text()
|
var authorElement = infoElement.select("span.elem_author").first()?.text()
|
||||||
|
if (authorElement == null) {
|
||||||
|
authorElement = infoElement.select("span.elem_screenwriter").first()?.text()
|
||||||
|
}
|
||||||
|
manga.author = authorElement
|
||||||
manga.artist = infoElement.select("span.elem_illustrator").first()?.text()
|
manga.artist = infoElement.select("span.elem_illustrator").first()?.text()
|
||||||
manga.genre = infoElement.select("span.elem_genre").text().split(",").plusElement(category).joinToString { it.trim() }
|
manga.genre = infoElement.select("span.elem_genre").text().split(",").plusElement(category).joinToString { it.trim() }
|
||||||
manga.description = infoElement.select("div.manga-description").text()
|
manga.description = infoElement.select("div.manga-description").text()
|
||||||
|
@ -148,6 +152,15 @@ class Mintmanga : ParsedHttpSource() {
|
||||||
val chapter = SChapter.create()
|
val chapter = SChapter.create()
|
||||||
chapter.setUrlWithoutDomain(urlElement.attr("href") + "?mtr=1")
|
chapter.setUrlWithoutDomain(urlElement.attr("href") + "?mtr=1")
|
||||||
|
|
||||||
|
var translators = ""
|
||||||
|
val translatorElement = urlElement.attr("title")
|
||||||
|
if (!translatorElement.isNullOrBlank()) {
|
||||||
|
translators = translatorElement
|
||||||
|
.replace("(Переводчик),", "&")
|
||||||
|
.removeSuffix(" (Переводчик)")
|
||||||
|
}
|
||||||
|
chapter.scanlator = translators
|
||||||
|
|
||||||
chapter.name = urlText.removeSuffix(" новое").trim()
|
chapter.name = urlText.removeSuffix(" новое").trim()
|
||||||
if (manga.title.length > 25) {
|
if (manga.title.length > 25) {
|
||||||
for (word in manga.title.split(' ')) {
|
for (word in manga.title.split(' ')) {
|
||||||
|
@ -161,7 +174,7 @@ class Mintmanga : ParsedHttpSource() {
|
||||||
chapter.name = chapter.name.substringAfter("…").trim()
|
chapter.name = chapter.name.substringAfter("…").trim()
|
||||||
}
|
}
|
||||||
|
|
||||||
chapter.date_upload = element.select("td.hidden-xxs").last()?.text()?.let {
|
chapter.date_upload = element.select("td.d-none").last()?.text()?.let {
|
||||||
try {
|
try {
|
||||||
SimpleDateFormat("dd.MM.yy", Locale.US).parse(it)?.time ?: 0L
|
SimpleDateFormat("dd.MM.yy", Locale.US).parse(it)?.time ?: 0L
|
||||||
} catch (e: ParseException) {
|
} catch (e: ParseException) {
|
||||||
|
|
|
@ -5,7 +5,7 @@ ext {
|
||||||
extName = 'Readmanga'
|
extName = 'Readmanga'
|
||||||
pkgNameSuffix = 'ru.readmanga'
|
pkgNameSuffix = 'ru.readmanga'
|
||||||
extClass = '.Readmanga'
|
extClass = '.Readmanga'
|
||||||
extVersionCode = 22
|
extVersionCode = 23
|
||||||
libVersion = '1.2'
|
libVersion = '1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -106,7 +106,11 @@ class Readmanga : ParsedHttpSource() {
|
||||||
}
|
}
|
||||||
|
|
||||||
val manga = SManga.create()
|
val manga = SManga.create()
|
||||||
manga.author = infoElement.select("span.elem_author").first()?.text()
|
var authorElement = infoElement.select("span.elem_author").first()?.text()
|
||||||
|
if (authorElement == null) {
|
||||||
|
authorElement = infoElement.select("span.elem_screenwriter").first()?.text()
|
||||||
|
}
|
||||||
|
manga.author = authorElement
|
||||||
manga.artist = infoElement.select("span.elem_illustrator").first()?.text()
|
manga.artist = infoElement.select("span.elem_illustrator").first()?.text()
|
||||||
manga.genre = infoElement.select("span.elem_genre").text().split(",").plusElement(category).joinToString { it.trim() }
|
manga.genre = infoElement.select("span.elem_genre").text().split(",").plusElement(category).joinToString { it.trim() }
|
||||||
manga.description = infoElement.select("div.manga-description").text()
|
manga.description = infoElement.select("div.manga-description").text()
|
||||||
|
@ -148,6 +152,15 @@ class Readmanga : ParsedHttpSource() {
|
||||||
val chapter = SChapter.create()
|
val chapter = SChapter.create()
|
||||||
chapter.setUrlWithoutDomain(urlElement.attr("href") + "?mtr=1")
|
chapter.setUrlWithoutDomain(urlElement.attr("href") + "?mtr=1")
|
||||||
|
|
||||||
|
var translators = ""
|
||||||
|
val translatorElement = urlElement.attr("title")
|
||||||
|
if (!translatorElement.isNullOrBlank()) {
|
||||||
|
translators = translatorElement
|
||||||
|
.replace("(Переводчик),", "&")
|
||||||
|
.removeSuffix(" (Переводчик)")
|
||||||
|
}
|
||||||
|
chapter.scanlator = translators
|
||||||
|
|
||||||
chapter.name = urlText.removeSuffix(" новое").trim()
|
chapter.name = urlText.removeSuffix(" новое").trim()
|
||||||
if (manga.title.length > 25) {
|
if (manga.title.length > 25) {
|
||||||
for (word in manga.title.split(' ')) {
|
for (word in manga.title.split(' ')) {
|
||||||
|
|
Loading…
Reference in New Issue