Madara - add Manga347, referer for chapters (#3281)

This commit is contained in:
Mike 2020-05-23 02:15:12 -04:00 committed by GitHub
parent b6f0ea7b12
commit ed4885143b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 3 deletions

View File

@ -5,7 +5,7 @@ ext {
appName = 'Tachiyomi: Madara (multiple sources)'
pkgNameSuffix = "all.madara"
extClass = '.MadaraFactory'
extVersionCode = 96
extVersionCode = 97
libVersion = '1.2'
}

View File

@ -363,7 +363,9 @@ abstract class Madara(
}
protected fun getXhrChapters(mangaId: String): Document {
val xhrHeaders = headersBuilder().add("Content-Type: application/x-www-form-urlencoded; charset=UTF-8").build()
val xhrHeaders = headersBuilder().add("Content-Type: application/x-www-form-urlencoded; charset=UTF-8")
.add("Referer", baseUrl)
.build()
val body = RequestBody.create(null, "action=manga_get_chapters&manga=$mangaId")
return client.newCall(POST("$baseUrl/wp-admin/admin-ajax.php", xhrHeaders, body)).execute().asJsoup()
}

View File

@ -122,7 +122,8 @@ class MadaraFactory : SourceFactory {
TurkceManga(),
EinherjarScan(),
KnightNoScanlation(),
DoujinYosh()
DoujinYosh(),
Manga347()
// Removed by request of site owner
// EarlyManga(),
// MangaGecesi(),
@ -905,3 +906,7 @@ class DoujinYosh : Madara("DoujinYosh", "https://doujinyosh.work", "id") {
Genre("Yuri", "yuri")
)
}
class Manga347 : Madara("Manga347", "https://manga347.com", "en", SimpleDateFormat("d MMM, yyyy", Locale.US)) {
override val pageListParseSelector = "li.blocks-gallery-item"
}