Skip to content

Commit

Permalink
min refact
Browse files Browse the repository at this point in the history
  • Loading branch information
Dark25 committed Feb 9, 2024
1 parent 9ea3470 commit a87ca0c
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,9 @@ class Hackstore : ConfigurableAnimeSource, ParsedAnimeHttpSource() {

// ============================ Video Links =============================
private fun extractUrlFromDonFunction(fullUrl: String): String {
val client = OkHttpClient()

val response = client.newCall(GET(fullUrl, headers)).execute()
val body = response.body.string()

val document = Jsoup.parse(body)

val scriptElement = document.selectFirst("script:containsData(function don())")
val urlPattern = Regex("window\\.location\\.href\\s*=\\s*'([^']+)'")
val matchResult = scriptElement?.data()?.let { urlPattern.find(it) }
Expand Down

0 comments on commit a87ca0c

Please sign in to comment.