WP MangaStream fix westManga (#5483)
their tweaked site return to default format
This commit is contained in:
		
							parent
							
								
									72b76d70d2
								
							
						
					
					
						commit
						9dfdc222a8
					
				| @ -5,7 +5,7 @@ ext { | |||||||
|     extName = 'WP MangaStream (multiple sources)' |     extName = 'WP MangaStream (multiple sources)' | ||||||
|     pkgNameSuffix = 'all.wpmangastream' |     pkgNameSuffix = 'all.wpmangastream' | ||||||
|     extClass = '.WPMangaStreamFactory' |     extClass = '.WPMangaStreamFactory' | ||||||
|     extVersionCode = 46 |     extVersionCode = 47 | ||||||
|     libVersion = '1.2' |     libVersion = '1.2' | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -198,144 +198,79 @@ class KomikCast : WPMangaStream("Komik Cast (WP Manga Stream)", "https://komikca | |||||||
|         GenreListFilter(getGenreList()) |         GenreListFilter(getGenreList()) | ||||||
|     ) |     ) | ||||||
| } | } | ||||||
|  | 
 | ||||||
| class WestManga : WPMangaStream("West Manga (WP Manga Stream)", "https://westmanga.info", "id") { | class WestManga : WPMangaStream("West Manga (WP Manga Stream)", "https://westmanga.info", "id") { | ||||||
|     override fun popularMangaRequest(page: Int): Request { |     override fun getGenreList(): List<Genre> = listOf( | ||||||
|         val url = if (page == 1) "$baseUrl/manga-list/?popular" else "$baseUrl/manga-list/page/$page/?popular" |         Genre("4 Koma", "344"), | ||||||
|         return GET(url, headers) |         Genre("Action", "13"), | ||||||
|     } |         Genre("Adventure", "4"), | ||||||
| 
 |         Genre("Anthology", "1494"), | ||||||
|     override fun latestUpdatesRequest(page: Int): Request { |         Genre("Comedy", "5"), | ||||||
|         val url = if (page == 1) "$baseUrl/manga-list/?latest" else "$baseUrl/manga-list/page/$page/?latest" |         Genre("Cooking", "54"), | ||||||
|         return GET(url, headers) |         Genre("Crime", "856"), | ||||||
|     } |         Genre("Crossdressing", "1306"), | ||||||
| 
 |         Genre("Demon", "64"), | ||||||
|     override fun searchMangaRequest(page: Int, query: String, filters: FilterList): Request { |         Genre("Drama", "6"), | ||||||
|         var builtUrl = if (page == 1) "$baseUrl/manga/" else "$baseUrl/manga/page/$page/" |         Genre("Ecchi", "14"), | ||||||
|         if (query != "") { |         Genre("Fantasy", "7"), | ||||||
|             builtUrl = if (page == 1) "$baseUrl/?s=$query&post_type=manga" else "$baseUrl/page/2/?s=$query&post_type=manga" |         Genre("Game", "36"), | ||||||
|         } else if (filters.size > 0) { |         Genre("Gender Bender", "149"), | ||||||
|             filters.forEach { filter -> |         Genre("Genderswap", "157"), | ||||||
|                 when (filter) { |         Genre("Gore", "56"), | ||||||
|                     is SortByFilter -> { |         Genre("Gyaru", "812"), | ||||||
|                         builtUrl = if (page == 1) "$baseUrl/manga-list/?" + filter.toUriPart() else "$baseUrl/manga-list/page/$page/?" + filter.toUriPart() |         Genre("Harem", "17"), | ||||||
|                     } |         Genre("Historical", "44"), | ||||||
|                     is GenreListFilter -> { |         Genre("Horror", "211"), | ||||||
|                         builtUrl = if (page == 1) "$baseUrl/genre/" + filter.toUriPart() else "$baseUrl/genre/" + filter.toUriPart() + "/page/$page/" |         Genre("Isekai", "20"), | ||||||
|                     } |         Genre("Isekai Action", "742"), | ||||||
|                 } |         Genre("Josei", "164"), | ||||||
|             } |         Genre("Magic", "65"), | ||||||
|         } |         Genre("Manga", "268"), | ||||||
|         val url = HttpUrl.parse(builtUrl)!!.newBuilder() |         Genre("Manhua", "32"), | ||||||
|         return GET(url.build().toString(), headers) |         Genre("Martial Art", "754"), | ||||||
|     } |         Genre("Martial Arts", "8"), | ||||||
| 
 |         Genre("Mature", "46"), | ||||||
|     override fun popularMangaSelector() = "div.result-search" |         Genre("Mecha", "22"), | ||||||
| 
 |         Genre("Medical", "704"), | ||||||
|     override fun popularMangaFromElement(element: Element): SManga { |         Genre("Medy", "1439"), | ||||||
|         val manga = SManga.create() |         Genre("Monsters", "91"), | ||||||
|         manga.thumbnail_url = element.select("div.fletch > .img_search > img").attr("src") |         Genre("Music", "457"), | ||||||
|         element.select(".kanan_search > .search_title > .titlex > a").first().let { |         Genre("Mystery", "30"), | ||||||
|             manga.setUrlWithoutDomain(it.attr("href")) |         Genre("Office Workers", "1501"), | ||||||
|             manga.title = it.text() |         Genre("Oneshot", "405"), | ||||||
|         } |         Genre("Project", "313"), | ||||||
|         return manga |         Genre("Psychological", "23"), | ||||||
|     } |         Genre("Reincarnation", "57"), | ||||||
| 
 |         Genre("Reinkarnasi", "1170"), | ||||||
|     override fun popularMangaNextPageSelector() = ".paginado>ul>li.dd + li.a" |         Genre("Romance", "15"), | ||||||
| 
 |         Genre("School", "102"), | ||||||
|     override fun mangaDetailsParse(document: Document): SManga { |         Genre("School Life", "9"), | ||||||
|         val infoElement = document.select("table.attr").first() |         Genre("Sci-fi", "33"), | ||||||
|         val descElement = document.select("div.sin").first() |         Genre("Seinen", "18"), | ||||||
|         val sepName = infoElement.select("tr:nth-child(5)>td").first() |         Genre("Shotacon", "1070"), | ||||||
|         val manga = SManga.create() |         Genre("Shoujo", "110"), | ||||||
|         manga.author = sepName.text() |         Genre("Shoujo Ai", "113"), | ||||||
|         manga.artist = sepName.text() |         Genre("Shounen", "10"), | ||||||
|         val genres = mutableListOf<String>() |         Genre("Shounen Ai", "shounen-ai"), | ||||||
|         infoElement.select("tr:nth-child(6)>td > a").forEach { element -> |         Genre("Si-fi", "776"), | ||||||
|             val genre = element.text() |         Genre("Slice of Lif", "773"), | ||||||
|             genres.add(genre) |         Genre("Slice of Life", "11"), | ||||||
|         } |         Genre("Smut", "586"), | ||||||
|         manga.genre = genres.joinToString(", ") |         Genre("Sports", "103"), | ||||||
|         manga.status = parseStatus(infoElement.select("tr:nth-child(4)>td").text()) |         Genre("Super Power", "274"), | ||||||
|         manga.description = descElement.select("p").text() |         Genre("Supernatural", "34"), | ||||||
|         manga.thumbnail_url = document.select(".topinfo > img").attr("src") |         Genre("Suspense", "181"), | ||||||
|         return manga |         Genre("Thriller", "170"), | ||||||
|     } |         Genre("Tragedy", "92"), | ||||||
| 
 |         Genre("Urban", "1050"), | ||||||
|     private class SortByFilter : UriPartFilter( |         Genre("Vampire", "160"), | ||||||
|         "Sort By", |         Genre("Video Games", "1093"), | ||||||
|         arrayOf( |         Genre("Webtoons", "486"), | ||||||
|             Pair("Default", ""), |         Genre("Yaoi", "yaoi"), | ||||||
|             Pair("A-Z", "A-Z"), |         Genre("Zombies", "377") | ||||||
|             Pair("Latest Added", "latest"), |  | ||||||
|             Pair("Popular", "popular") |  | ||||||
|         ) |  | ||||||
|     ) |  | ||||||
| 
 |  | ||||||
|     private class GenreListFilter : UriPartFilter( |  | ||||||
|         "Genre", |  | ||||||
|         arrayOf( |  | ||||||
|             Pair("Default", ""), |  | ||||||
|             Pair("4-Koma", "4-koma"), |  | ||||||
|             Pair("Action", "action"), |  | ||||||
|             Pair("Adventure", "adventure"), |  | ||||||
|             Pair("Comedy", "comedy"), |  | ||||||
|             Pair("Cooking", "cooking"), |  | ||||||
|             Pair("Demons", "demons"), |  | ||||||
|             Pair("Drama", "drama"), |  | ||||||
|             Pair("Ecchi", "ecchi"), |  | ||||||
|             Pair("Fantasy", "fantasy"), |  | ||||||
|             Pair("FantasyAction", "fantasyaction"), |  | ||||||
|             Pair("Game", "game"), |  | ||||||
|             Pair("Gender Bender", "gender-bender"), |  | ||||||
|             Pair("Gore", "gore"), |  | ||||||
|             Pair("Harem", "harem"), |  | ||||||
|             Pair("Historical", "historical"), |  | ||||||
|             Pair("Horro", "horro"), |  | ||||||
|             Pair("Horror", "horror"), |  | ||||||
|             Pair("Isekai", "isekai"), |  | ||||||
|             Pair("Isekai Action", "isekai-action"), |  | ||||||
|             Pair("Josei", "josei"), |  | ||||||
|             Pair("Magic", "magic"), |  | ||||||
|             Pair("Manga", "manga"), |  | ||||||
|             Pair("Manhua", "manhua"), |  | ||||||
|             Pair("Martial arts", "martial-arts"), |  | ||||||
|             Pair("Mature", "mature"), |  | ||||||
|             Pair("Mecha", "mecha"), |  | ||||||
|             Pair("Medical", "medical"), |  | ||||||
|             Pair("Music", "music"), |  | ||||||
|             Pair("Mystery", "mystery"), |  | ||||||
|             Pair("Oneshot", "oneshot"), |  | ||||||
|             Pair("Project", "project"), |  | ||||||
|             Pair("Psychological", "psychological"), |  | ||||||
|             Pair("Romance", "romance"), |  | ||||||
|             Pair("School", "school"), |  | ||||||
|             Pair("School life", "school-life"), |  | ||||||
|             Pair("Sci fi", "sci-fi"), |  | ||||||
|             Pair("Seinen", "seinen"), |  | ||||||
|             Pair("Shoujo", "shoujo"), |  | ||||||
|             Pair("Shoujo Ai", "shoujo-ai"), |  | ||||||
|             Pair("Shounen", "shounen"), |  | ||||||
|             Pair("Slice of Life", "slice-of-life"), |  | ||||||
|             Pair("Sports", "sports"), |  | ||||||
|             Pair("Super Power", "super-power"), |  | ||||||
|             Pair("Supernatural", "supernatural"), |  | ||||||
|             Pair("Suspense", "suspense"), |  | ||||||
|             Pair("Thriller", "thriller"), |  | ||||||
|             Pair("Tragedy", "tragedy"), |  | ||||||
|             Pair("Vampire", "vampire"), |  | ||||||
|             Pair("Webtoons", "webtoons"), |  | ||||||
|             Pair("Yuri", "yuri") |  | ||||||
|         ) |  | ||||||
|     ) |  | ||||||
| 
 |  | ||||||
|     override fun getFilterList() = FilterList( |  | ||||||
|         Filter.Header("NOTE: sort and genre can't be combined and ignored when using text search!"), |  | ||||||
|         Filter.Separator(), |  | ||||||
|         SortByFilter(), |  | ||||||
|         GenreListFilter() |  | ||||||
|     ) |     ) | ||||||
| } | } | ||||||
|  | 
 | ||||||
| class KomikGo : WPMangaStream("Komik GO (WP Manga Stream)", "https://komikgo.com", "id") { | class KomikGo : WPMangaStream("Komik GO (WP Manga Stream)", "https://komikgo.com", "id") { | ||||||
| 
 | 
 | ||||||
|     override fun popularMangaRequest(page: Int): Request { |     override fun popularMangaRequest(page: Int): Request { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Riztard Lanthorn
						Riztard Lanthorn