Skip to content

Commit

Permalink
Parse suspended account info, fix #68
Browse files Browse the repository at this point in the history
  • Loading branch information
UjuiUjuMandan committed Jun 7, 2024
1 parent 293312b commit d8a8db5
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,14 @@ object ProfileParser {
}
Result(displayName, avatar)
}.getOrElse {
ExceptionUtils.throwIfFatal(it)
throw ParseException("Parse forums error")
if (body.contains("Your account has been temporarily suspended")) {
logcat { "Account suspended" }
val displayName = Jsoup.parse(body).select("p.home > b > a").first()?.text()
Result(displayName, null)
} else {
ExceptionUtils.throwIfFatal(it)
throw ParseException("Parse forums error")
}
}
}

Expand Down

0 comments on commit d8a8db5

Please sign in to comment.