mirror of
https://github.com/mihonapp/mihon.git
synced 2024-12-24 03:22:18 +00:00
Better recent updates regexp for Mangasee (#539)
This commit is contained in:
parent
6f297161de
commit
b28ef61618
1 changed files with 2 additions and 2 deletions
|
@ -28,7 +28,7 @@ class Mangasee(override val id: Int) : ParsedOnlineSource() {
|
|||
|
||||
override val supportsLatest = true
|
||||
|
||||
private val recentUpdatesPattern = Pattern.compile("(.*?)\\s(\\d+)")
|
||||
private val recentUpdatesPattern = Pattern.compile("(.*?)\\s(\\d+\\.?\\d*)\\s?(Completed)?")
|
||||
|
||||
private val indexPattern = Pattern.compile("-index-(.*?)-")
|
||||
|
||||
|
@ -242,7 +242,7 @@ class Mangasee(override val id: Int) : ParsedOnlineSource() {
|
|||
val indexOfMangaUrl = chapterUrl.indexOf("-chapter-")
|
||||
val indexOfLastPath = chapterUrl.lastIndexOf("/")
|
||||
val mangaUrl = chapterUrl.substring(indexOfLastPath, indexOfMangaUrl)
|
||||
val defaultText = it.select("p.clamp2").text();
|
||||
val defaultText = it.select("p.clamp2").text()
|
||||
val m = recentUpdatesPattern.matcher(defaultText)
|
||||
val title = if (m.matches()) m.group(1) else defaultText
|
||||
manga.setUrlWithoutDomain("/manga" + mangaUrl)
|
||||
|
|
Loading…
Reference in a new issue