diff --git a/app/src/main/java/xyz/fycz/myreader/greendao/entity/rule/BookSource.java b/app/src/main/java/xyz/fycz/myreader/greendao/entity/rule/BookSource.java
index a24f9c1..d878691 100644
--- a/app/src/main/java/xyz/fycz/myreader/greendao/entity/rule/BookSource.java
+++ b/app/src/main/java/xyz/fycz/myreader/greendao/entity/rule/BookSource.java
@@ -425,14 +425,21 @@ public class BookSource extends BaseSource implements Parcelable, Cloneable {
this.concurrentRate = concurrentRate;
}
+ @Nullable
@Override
- public String getHeader() {
- return sourceHeaders;
+ public String getConcurrentRateKt() {
+ return concurrentRate;
}
+ @Nullable
@Override
- public void setHeader(@Nullable String header) {
- this.sourceHeaders = header;
+ public String getLoginUrlKt() {
+ return loginUrl;
+ }
+
+ @Override
+ public String getHeader() {
+ return sourceHeaders;
}
@NonNull
diff --git a/app/src/main/java/xyz/fycz/myreader/model/third3/BaseSource.kt b/app/src/main/java/xyz/fycz/myreader/model/third3/BaseSource.kt
index baca4fe..f4f3027 100644
--- a/app/src/main/java/xyz/fycz/myreader/model/third3/BaseSource.kt
+++ b/app/src/main/java/xyz/fycz/myreader/model/third3/BaseSource.kt
@@ -17,10 +17,16 @@ import javax.script.SimpleBindings
@Suppress("unused")
abstract class BaseSource : JsExtensions {
- open var concurrentRate: String? = null // 并发率
- open var loginUrl: String? = null // 登录地址
- //var loginUi: String? // 登录UI
- open var header: String? = null // 请求头
+ //var concurrentRate: String? // 并发率
+ //var loginUrl: String? // 登录地址
+ //var loginUi: String? // 登录UI
+ //var header: String? // 请求头
+
+ open fun getConcurrentRateKt(): String? = null // 并发率
+
+ open fun getLoginUrlKt(): String? = null // 登录地址
+
+ open fun getHeader(): String? = null // 请求头
open fun getTag(): String = ""
@@ -31,7 +37,7 @@ abstract class BaseSource : JsExtensions {
}*/
fun getLoginJs(): String? {
- val loginJs = loginUrl
+ val loginJs = getLoginUrlKt()
return when {
loginJs == null -> null
loginJs.startsWith("@js:") -> loginJs.substring(4)
@@ -52,7 +58,7 @@ abstract class BaseSource : JsExtensions {
*/
fun getHeaderMap(hasLoginHeader: Boolean = false) = HashMap().apply {
this[APPCONST.UA_NAME] = APPCONST.DEFAULT_USER_AGENT
- header?.let {
+ getHeader()?.let {
GSON.fromJsonObject
解析结果
网页源码
+ 调试日志
重新请求
测试搜索配置
测试书籍详情
@@ -540,6 +541,7 @@
没有网络
网络连接超时
数据解析失败
+ 拷贝书源