WebTools

object WebTools

Web tools used to get values and eval js on web pages

Functions

Link copied to clipboard
suspend fun evalJS(code: String): String

Eval js on a webview

Link copied to clipboard
suspend fun getCookies(link: String, userAgent: String = webJs.defaultUserAgent, headers: Map<String, String> = emptyMap(), timeout: Long = 1000): String?

Get the cookies of the link after being loaded in a Webview

Link copied to clipboard
suspend fun getHtml(link: String, userAgent: String = webJs.defaultUserAgent, headers: Map<String, String> = emptyMap(), timeout: Long = 1000): String?

Get the html of the link after being loaded in a Webview

Link copied to clipboard
fun unpack(packedCode: String): String

Decode a single packed function

Link copied to clipboard
fun unpackAll(packedCodes: List<String>): List<String>

Decode multiple packed functions

Link copied to clipboard
fun unpackLink(link: String, packedSelector: (values: List<String>) -> String = { it.first() }): String

Search packed functions in the link html and decode ONE defined by packedSelector, by default the first packed found will be decoded. Packed functions will be searched using this regex: eval\((function\(p,a,c,k,e,?dr?\)..split\('\|'\).)\)

Link copied to clipboard

Search packed functions in the link html and decode all. Packed functions will be searched using this regex: eval\((function\(p,a,c,k,e,?dr?\)..split\('\|'\).)\)