pull/441/head
gedoor 4 years ago
parent 04a4c076a5
commit e4dde5cced
  1. 4
      app/src/main/java/io/legado/app/help/JsExtensions.kt
  2. 6
      app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt

@ -3,8 +3,8 @@ package io.legado.app.help
import android.util.Base64
import androidx.annotation.Keep
import io.legado.app.constant.AppConst.dateFormat
import io.legado.app.help.http.SSLHelper
import io.legado.app.help.http.CookieStore
import io.legado.app.help.http.SSLHelper
import io.legado.app.model.analyzeRule.AnalyzeUrl
import io.legado.app.utils.*
import org.jsoup.Connection
@ -127,7 +127,7 @@ interface JsExtensions {
val cookie = CookieStore.getCookie(tag)
val cookieMap = CookieStore.cookieToMap(cookie)
return if (key != null) {
cookieMap.get(key) ?: ""
cookieMap[key] ?: ""
} else {
cookie
}

@ -282,7 +282,7 @@ class AnalyzeUrl(
val cookie = CookieStore.getCookie(tag)
if (cookie.isNotEmpty()) {
val cookieMap = CookieStore.cookieToMap(cookie)
val customCookieMap = CookieStore.cookieToMap(headerMap.get("Cookie") ?: "")
val customCookieMap = CookieStore.cookieToMap(headerMap["Cookie"] ?: "")
cookieMap.putAll(customCookieMap)
val newCookie = CookieStore.mapToCookie(cookieMap)
newCookie?.let {
@ -321,7 +321,7 @@ class AnalyzeUrl(
val cookie = CookieStore.getCookie(tag)
if (cookie.isNotEmpty()) {
val cookieMap = CookieStore.cookieToMap(cookie)
val customCookieMap = CookieStore.cookieToMap(headerMap.get("Cookie") ?: "")
val customCookieMap = CookieStore.cookieToMap(headerMap["Cookie"] ?: "")
cookieMap.putAll(customCookieMap)
val newCookie = CookieStore.mapToCookie(cookieMap)
newCookie?.let {
@ -369,7 +369,7 @@ class AnalyzeUrl(
val cookie = CookieStore.getCookie(tag)
if (cookie.isNotEmpty()) {
val cookieMap = CookieStore.cookieToMap(cookie)
val customCookieMap = CookieStore.cookieToMap(headerMap.get("Cookie") ?: "")
val customCookieMap = CookieStore.cookieToMap(headerMap["Cookie"] ?: "")
cookieMap.putAll(customCookieMap)
val newCookie = CookieStore.mapToCookie(cookieMap)
newCookie?.let {

Loading…
Cancel
Save