pull/341/head^2
gedoor 4 years ago
parent ea5e975d08
commit d08e3b52f3
  1. 5
      app/src/main/java/io/legado/app/model/analyzeRule/AnalyzeUrl.kt

@ -59,10 +59,11 @@ class AnalyzeUrl(
private var body: String? = null
private var requestBody: RequestBody? = null
private var method = RequestMethod.GET
private val splitUrlRegex = Regex(",[^\\{]*")
init {
baseUrl?.let {
this.baseUrl = it.split(",[^\\{]*".toRegex(), 1)[0]
this.baseUrl = it.split(splitUrlRegex, 1)[0]
}
headerMapF?.let { headerMap.putAll(it) }
//替换参数
@ -172,7 +173,7 @@ class AnalyzeUrl(
* 处理URL
*/
private fun initUrl() {
var urlArray = ruleUrl.split(",[^\\{]*".toRegex(), 2)
var urlArray = ruleUrl.split(splitUrlRegex, 2)
url = urlArray[0]
urlHasQuery = urlArray[0]
NetworkUtils.getBaseUrl(url)?.let {

Loading…
Cancel
Save