Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -24,6 +24,6 @@
|
|||||||
* 校验所选
|
* 校验所选
|
||||||
* 校验书源可批量校验书源,由于网络等原因结果仅限参考
|
* 校验书源可批量校验书源,由于网络等原因结果仅限参考
|
||||||
* "校验成功"是指所选的校验项目全部通过
|
* "校验成功"是指所选的校验项目全部通过
|
||||||
* 可正常识别搜索为空、发现为空、搜索(发现)目录为空、搜索(发现)正文为空、校验超时导致的失效,其余原因(网站异常、源码变动)导致的视为规则失效
|
* 可正常识别搜索为空、发现为空、搜索(发现)目录为空、搜索(发现)正文为空、校验超时、js执行错误导致的失效,其余的原因视为网站失效
|
||||||
* 校验搜索优先使用书源填写的校验关键词,不存在时使用用户输入的关键词
|
* 校验搜索优先使用书源填写的校验关键词,不存在时使用用户输入的关键词
|
||||||
* 校验结束后会自动筛选"失效"书源
|
* 校验结束后会自动筛选"失效"书源
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>阅读3.0源编辑器_V4.0</title>
|
<title>阅读3.0源编辑器_V4.0</title>
|
||||||
<link rel="icon" href="favicon.ico">
|
<link rel="icon" href="../favicon.ico">
|
||||||
<link rel="stylesheet" type="text/css" href="index.css"/>
|
<link rel="stylesheet" type="text/css" href="index.css"/>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<div>源类型 :</div>
|
<div>源类型 :</div>
|
||||||
<textarea rows="1" id="bookSourceType" class="base" title="bookSourceType"
|
<textarea rows="1" id="bookSourceType" class="base" title="bookSourceType"
|
||||||
placeholder="<必填>0:文本 1:音频 3:图片"></textarea>
|
placeholder="<必填>0:文本 1:音频 2:图片"></textarea>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div>源名称 :</div>
|
<div>源名称 :</div>
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -1,3 +1,3 @@
|
|||||||
<!DOCTYPE html><html lang="en" style="padding: 0;height:100%"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"><link rel="icon" href="../favicon.ico" type="image/x-icon"><link rel="shortcut icon" href="../favicon.ico" type="image/x-icon"><title>Legado Bookshelf</title><link href="css/about.54684f5f.css" rel="prefetch"><link href="css/detail.c8b66cd9.css" rel="prefetch"><link href="js/about.a06cf811.js" rel="prefetch"><link href="js/detail.76141273.js" rel="prefetch"><link href="css/app.e4c919b7.css" rel="preload" as="style"><link href="css/chunk-vendors.5f0f4fba.css" rel="preload" as="style"><link href="js/app.4f313f0a.js" rel="preload" as="script"><link href="js/chunk-vendors.be6090cd.js" rel="preload" as="script"><link href="css/chunk-vendors.5f0f4fba.css" rel="stylesheet"><link href="css/app.e4c919b7.css" rel="stylesheet"></head><style>body::-webkit-scrollbar {
|
<!DOCTYPE html><html lang="en" style="padding: 0;height:100%"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"><link rel="icon" href="../favicon.ico" type="image/x-icon"><link rel="shortcut icon" href="../favicon.ico" type="image/x-icon"><title>Legado Bookshelf</title><link href="css/about.54684f5f.css" rel="prefetch"><link href="css/detail.6c59ead7.css" rel="prefetch"><link href="js/about.15db9edd.js" rel="prefetch"><link href="js/detail.7345620e.js" rel="prefetch"><link href="css/app.e4c919b7.css" rel="preload" as="style"><link href="css/chunk-vendors.5f0f4fba.css" rel="preload" as="style"><link href="js/app.577d13d7.js" rel="preload" as="script"><link href="js/chunk-vendors.be6090cd.js" rel="preload" as="script"><link href="css/chunk-vendors.5f0f4fba.css" rel="stylesheet"><link href="css/app.e4c919b7.css" rel="stylesheet"></head><style>body::-webkit-scrollbar {
|
||||||
display: none;
|
display: none;
|
||||||
}</style><body style="margin: 0;height:100%"><noscript><strong>We're sorry but yd-web-tool doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="js/chunk-vendors.be6090cd.js"></script><script src="js/app.4f313f0a.js"></script></body></html>
|
}</style><body style="margin: 0;height:100%"><noscript><strong>We're sorry but yd-web-tool doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="js/chunk-vendors.be6090cd.js"></script><script src="js/app.577d13d7.js"></script></body></html>
|
||||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
@@ -4,7 +4,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>阅读3.0订阅源编辑器_V4.0</title>
|
<title>阅读3.0订阅源编辑器_V4.0</title>
|
||||||
<link rel="icon" href="favicon.ico">
|
<link rel="icon" href="../favicon.ico">
|
||||||
<link rel="stylesheet" type="text/css" href="index.css"/>
|
<link rel="stylesheet" type="text/css" href="index.css"/>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import androidx.annotation.IntDef
|
|||||||
object BookType {
|
object BookType {
|
||||||
const val default = 0 // 0 文本
|
const val default = 0 // 0 文本
|
||||||
const val audio = 1 // 1 音频
|
const val audio = 1 // 1 音频
|
||||||
const val image = 3 //图片
|
const val image = 2 //图片
|
||||||
const val local = "loc_book"
|
const val local = "loc_book"
|
||||||
|
|
||||||
@Target(AnnotationTarget.VALUE_PARAMETER)
|
@Target(AnnotationTarget.VALUE_PARAMETER)
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ data class BookSource(
|
|||||||
var bookSourceName: String = "",
|
var bookSourceName: String = "",
|
||||||
// 分组
|
// 分组
|
||||||
var bookSourceGroup: String? = null,
|
var bookSourceGroup: String? = null,
|
||||||
// 类型,0 文本,1 音频, 3 图片
|
// 类型,0 文本,1 音频, 2 图片
|
||||||
@BookType.Type
|
@BookType.Type
|
||||||
var bookSourceType: Int = 0,
|
var bookSourceType: Int = 0,
|
||||||
// 详情页url正则
|
// 详情页url正则
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ import kotlinx.coroutines.asCoroutineDispatcher
|
|||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import java.util.concurrent.Executors
|
import java.util.concurrent.Executors
|
||||||
import kotlin.math.min
|
import kotlin.math.min
|
||||||
|
import org.mozilla.javascript.WrappedException
|
||||||
|
import javax.script.ScriptException
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验书源
|
* 校验书源
|
||||||
@@ -176,18 +178,15 @@ class CheckSourceService : BaseService() {
|
|||||||
}.timeout(CheckSource.timeout)
|
}.timeout(CheckSource.timeout)
|
||||||
.onError(searchCoroutine) {
|
.onError(searchCoroutine) {
|
||||||
when(it) {
|
when(it) {
|
||||||
//校验超时不能正常实现 不能识别
|
|
||||||
is TimeoutCancellationException -> source.addGroup("校验超时")
|
is TimeoutCancellationException -> source.addGroup("校验超时")
|
||||||
//NoStackTraceException 已经添加了分组,其余的视为规则失效
|
is ScriptException, is WrappedException -> source.addGroup("js失效")
|
||||||
!is NoStackTraceException -> source.addGroup("规则失效")
|
!is NoStackTraceException -> source.addGroup("网站失效")
|
||||||
}
|
}
|
||||||
source.bookSourceComment =
|
source.bookSourceComment =
|
||||||
"Error: ${it.localizedMessage}" + if (source.bookSourceComment.isNullOrBlank())
|
"Error: ${it.localizedMessage}" + if (source.bookSourceComment.isNullOrBlank())
|
||||||
"" else "\n\n${source.bookSourceComment}"
|
"" else "\n\n${source.bookSourceComment}"
|
||||||
Debug.updateFinalMessage(source.bookSourceUrl, "校验失败:${it.localizedMessage}")
|
Debug.updateFinalMessage(source.bookSourceUrl, "校验失败:${it.localizedMessage}")
|
||||||
}.onSuccess(searchCoroutine) {
|
}.onSuccess(searchCoroutine) {
|
||||||
source.removeGroup("失效")
|
|
||||||
source.removeGroup("规则失效")
|
|
||||||
source.removeGroup("校验超时")
|
source.removeGroup("校验超时")
|
||||||
Debug.updateFinalMessage(source.bookSourceUrl, "校验成功")
|
Debug.updateFinalMessage(source.bookSourceUrl, "校验成功")
|
||||||
}.onFinally(IO) {
|
}.onFinally(IO) {
|
||||||
@@ -230,7 +229,6 @@ class CheckSourceService : BaseService() {
|
|||||||
when (it) {
|
when (it) {
|
||||||
is ContentEmptyException -> source.addGroup("${bookType}正文失效")
|
is ContentEmptyException -> source.addGroup("${bookType}正文失效")
|
||||||
is TocEmptyException -> source.addGroup("${bookType}目录失效")
|
is TocEmptyException -> source.addGroup("${bookType}目录失效")
|
||||||
//超时 网站异常 源码改变
|
|
||||||
else -> throw it
|
else -> throw it
|
||||||
}
|
}
|
||||||
}.onSuccess {
|
}.onSuccess {
|
||||||
|
|||||||
Reference in New Issue
Block a user