mirror of
https://github.com/venera-app/venera-configs.git
synced 2025-12-16 17:31:16 +00:00
Fix 少年ジャンプ latest app version getting (#161)
* Fix version getting 置换掉错误的版本获取逻辑,使用新的版本获取逻辑,以修复反爬 * 版本号
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
class ShonenJumpPlus extends ComicSource {
|
class ShonenJumpPlus extends ComicSource {
|
||||||
name = "少年ジャンプ+";
|
name = "少年ジャンプ+";
|
||||||
key = "shonen_jump_plus";
|
key = "shonen_jump_plus";
|
||||||
version = "1.1.0";
|
version = "1.1.1";
|
||||||
minAppVersion = "1.2.1";
|
minAppVersion = "1.2.1";
|
||||||
url =
|
url =
|
||||||
"https://git.nyne.dev/nyne/venera-configs/raw/branch/main/shonen_jump_plus.js";
|
"https://git.nyne.dev/nyne/venera-configs/raw/branch/main/shonen_jump_plus.js";
|
||||||
@@ -10,7 +10,7 @@ class ShonenJumpPlus extends ComicSource {
|
|||||||
bearerToken = null;
|
bearerToken = null;
|
||||||
userAccountId = null;
|
userAccountId = null;
|
||||||
tokenExpiry = 0;
|
tokenExpiry = 0;
|
||||||
latestVersion = "4.0.21";
|
latestVersion = "4.0.24";
|
||||||
|
|
||||||
get headers() {
|
get headers() {
|
||||||
return {
|
return {
|
||||||
@@ -32,10 +32,13 @@ class ShonenJumpPlus extends ComicSource {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async init() {
|
async init() {
|
||||||
const url = "https://apps.apple.com/jp/app/少年ジャンプ-人気漫画が読める雑誌アプリ/id875750302";
|
const url = "https://apps.apple.com/jp/app/id875750302";
|
||||||
|
|
||||||
const resp = await Network.get(url);
|
const resp = await Network.get(url);
|
||||||
const match = resp.body.match(/":\[\{\\"versionDisplay\\":\\"([\d.]+)\\",\\"rele/);
|
|
||||||
if (match) {
|
const match = resp.body.match(/whats-new__latest__version">[^<]*?([\d.]+)</);
|
||||||
|
|
||||||
|
if (match && match[1]) {
|
||||||
this.latestVersion = match[1];
|
this.latestVersion = match[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user