diff --git a/src/en/dynasty/build.gradle b/src/en/dynasty/build.gradle index 63c49a3cd..d4593a447 100644 --- a/src/en/dynasty/build.gradle +++ b/src/en/dynasty/build.gradle @@ -5,8 +5,8 @@ ext { appName = 'Tachiyomi: Dynasty' pkgNameSuffix = "en.dynasty" extClass = '.DynastyAnthologies; .DynastyIssues; .DynastySeries; .DynastyDoujins' - extVersionCode = 1 - extVersionSuffix = 1 + extVersionCode = 2 + extVersionSuffix = 2 libVersion = '1.2' } diff --git a/src/en/dynasty/src/eu/kanade/tachiyomi/extension/en/dynasty/DynastyScans.kt b/src/en/dynasty/src/eu/kanade/tachiyomi/extension/en/dynasty/DynastyScans.kt index 5e023f407..9c5040b11 100644 --- a/src/en/dynasty/src/eu/kanade/tachiyomi/extension/en/dynasty/DynastyScans.kt +++ b/src/en/dynasty/src/eu/kanade/tachiyomi/extension/en/dynasty/DynastyScans.kt @@ -17,7 +17,6 @@ import org.jsoup.nodes.Node import org.jsoup.nodes.TextNode import java.text.SimpleDateFormat import java.util.* -import java.util.regex.Pattern abstract class DynastyScans : ParsedHttpSource() { @@ -155,12 +154,8 @@ abstract class DynastyScans : ParsedHttpSource() { override fun pageListParse(document: Document): List { val pages = mutableListOf() try { - val script = document.select("script").last() - val p = Pattern.compile("(?s)(pages)\\s??=\\s??\\[(.*?)\\]") - val m = p.matcher(script.html()) - var imageUrls = JSONArray() - while (m.find()) - imageUrls = JSONArray("[" + m.group(2) + "]") + val imageUrl = document.select("script").last().html().substringAfter("var pages = [").substringBefore("];") + var imageUrls = JSONArray("[$imageUrl]") (0..imageUrls.length() - 1) .map { imageUrls.getJSONObject(it) }