- String url = chapUrl.toString();
- InputStream imageIn = null;
- Element imageDoc = null;
+ Document chapDoc = DataUtil.load(Instance.getCache().open(chapUrl, this, false), "UTF-8", chapUrl.toString());
+
+ // Example of what we want:
+ // URL: http://fanfox.net/manga/solo_leveling/c110.5/1.html#ipg1
+ // IMAGE, not working:
+ // http://s.fanfox.net/store/manga/29037/110.5/compressed/s034.jpg?token=f630767b0c96f6cc793fc8f1fc177c0ae9342eb1&ttl=1585929600
+ // IMAGE, working:
+ // http://s.fanfox.net/store/manga/29037/000.0/compressed/m2018110o_143554_925.jpg?token=7d74569986335d49651ef1040f7dcb9dbd559b1b&ttl=1585929600
+ // NOTE: (c110.5 -> 110.5, c000 -> 000.0)
+ // NOTE: image key: m2018110o_143554_925 can be found in the script, but not
+ // sorted
+
+ // 0. Get the javascript content
+ StringBuilder javascript = new StringBuilder();
+ for (Element script : chapDoc.getElementsByTag("script")) {
+ javascript.append(script.html());
+ javascript.append("\n");
+ }