Skip to content

Commit

Permalink
fix tieba sign error
Browse files Browse the repository at this point in the history
  • Loading branch information
kukume committed Dec 5, 2024
1 parent adc8d64 commit 8c395df
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ fun DependencyHandlerScope.ktor() {
dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactor")
implementation("org.springframework.boot:spring-boot-starter-data-mongodb-reactive")
implementation("com.github.pengrad:java-telegram-bot-api:7.9.1")
implementation("com.github.pengrad:java-telegram-bot-api:7.11.0")
implementation("org.jsoup:jsoup:1.17.2")
val ociVersion = "3.48.0"
implementation("com.oracle.oci.sdk:oci-java-sdk-core:$ociVersion")
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/me/kuku/telegram/entity/BaiduEntity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class BaiduEntity: BaseEntity() {
var sign: Status = Status.OFF

private fun otherCookie(sToken: String): String {
return "BDUSS=.*?;".toRegex().find(sToken)!!.value + "STOKEN=$sToken; "
return "BDUSS=.*?;".toRegex().find(cookie)!!.value + "STOKEN=$sToken; "
}

fun teiBaCookie(): String {
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/me/kuku/telegram/logic/BaiduLogic.kt
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ class BaiduLogic (
headers {
headers.forEach { append(it.key, it.value) }
}
}.body<JsonNode>()
}.bodyAsText().toJsonNode()
if (!arrayOf(1101, 0).contains(jsonObject["no"].asInt())) error(jsonObject["error"].asText())
}
}
Expand Down

0 comments on commit 8c395df

Please sign in to comment.