From b3959d1e2e0ea25512d9d82077f879dc97247a4e Mon Sep 17 00:00:00 2001 From: gedoor Date: Thu, 30 Sep 2021 19:53:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/assets/data/BookSourceXxl.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/assets/data/BookSourceXxl.json b/app/src/main/assets/data/BookSourceXxl.json index 3a7bfc357..7f35b07dd 100644 --- a/app/src/main/assets/data/BookSourceXxl.json +++ b/app/src/main/assets/data/BookSourceXxl.json @@ -8,7 +8,7 @@ "loginCheckJs": "var strRes = result\nvar c = JSON.parse(result.body())\nif (c.statusCode == 301) {\n var loginInfo = source.getLoginInfo()\n var dl = null\n if (loginInfo) {\n dl = java.getResponse(\"https://www.kaixin7days.com/login@\" + loginInfo).body()\n } else {\n dl = java.getResponse(\"https://www.kaixin7days.com/visitorLogin@{}\").body()\n }\n c = JSON.parse(dl)\n var accessToken = {\n Authorization: \"Bearer \" + c.content.accessToken\n }\n var header = JSON.stringify(accessToken)\n source.putLoginHeader(header)\n strRes = java.getResponse(\"@Header:\" + header + url)\n}\nstrRes", "serialNumber": -100, "enable": true, - "ruleFindUrl": "@js:var header = source.getLoginHeader()\nvar json = \"\"\nvar j = null\nif (header != null) {\n json = java.getResponse(\"@Header:\" + header + \"https://www.kaixin7days.com/book-service/bookMgt/getBookCategroy@{}\").body()\n j = JSON.parse(json)\n}\nif (j == null || j.statusCode == 301) {\n json = java.getResponse(\"https://www.kaixin7days.com/visitorLogin@{}\").body()\n j = JSON.parse(json)\n var accessToken = {\n Authorization: \"Bearer \" + j.content.accessToken\n }\n header = JSON.stringify(accessToken)\n source.putLoginHeader(header)\n json = java.getResponse(\"@Header:\" + header + \"https://www.kaixin7days.com/book-service/bookMgt/getBookCategroy@{}\").body()\n j = JSON.parse(json)\n}\nvar fls = j.content\nvar fx = \"\"\nfor (var i = 0; i < fls.length; i++) {\n fx = fx + fls[i].categoryName + '::/book-service/bookMgt/getAllBookByCategroyId@{\"categoryIds\": \"' + fls[i].associationCategoryIDs + '\",\"pageNum\": {{searchPage}},\"pageSize\": 100}&&'\n}\nfx", + "ruleFindUrl": "@js:var header = source.getLoginHeader()\nvar json = \"\"\nvar j = null\nif (header != null) {\n json = java.getResponse(\"@Header:\" + header + \"https://www.kaixin7days.com/book-service/bookMgt/getBookCategroy@{}\").body()\n j = JSON.parse(json)\n}\nif (j == null || j.statusCode != 200) {\n json = java.getResponse(\"https://www.kaixin7days.com/visitorLogin@{}\").body()\n j = JSON.parse(json)\n var accessToken = {\n Authorization: \"Bearer \" + j.content.accessToken\n }\n header = JSON.stringify(accessToken)\n source.putLoginHeader(header)\n json = java.getResponse(\"@Header:\" + header + \"https://www.kaixin7days.com/book-service/bookMgt/getBookCategroy@{}\").body()\n j = JSON.parse(json)\n}\nvar fls = j.content\nvar fx = \"\"\nfor (var i = 0; i < fls.length; i++) {\n fx = fx + fls[i].categoryName + '::/book-service/bookMgt/getAllBookByCategroyId@{\"categoryIds\": \"' + fls[i].associationCategoryIDs + '\",\"pageNum\": {{searchPage}},\"pageSize\": 100}&&'\n}\nfx", "ruleFindList": "$.content.content", "ruleFindName": "$.title", "ruleFindAuthor": "$.author",