|
|
|
|
@ -5,32 +5,25 @@ import android.os.Build
|
|
|
|
|
import android.os.Handler
|
|
|
|
|
import android.os.Looper
|
|
|
|
|
import android.util.Log
|
|
|
|
|
import android.webkit.ConsoleMessage
|
|
|
|
|
import android.webkit.JavascriptInterface
|
|
|
|
|
import android.webkit.WebChromeClient
|
|
|
|
|
import android.webkit.WebView
|
|
|
|
|
import androidx.annotation.MainThread
|
|
|
|
|
import androidx.collection.ArrayMap
|
|
|
|
|
import kotlinx.coroutines.CoroutineExceptionHandler
|
|
|
|
|
import kotlinx.coroutines.Dispatchers
|
|
|
|
|
import kotlinx.coroutines.MainScope
|
|
|
|
|
import kotlinx.coroutines.cancel
|
|
|
|
|
import kotlinx.coroutines.launch
|
|
|
|
|
import kotlinx.coroutines.suspendCancellableCoroutine
|
|
|
|
|
import kotlinx.coroutines.withContext
|
|
|
|
|
import com.deniscerri.ytdl.BuildConfig
|
|
|
|
|
import com.deniscerri.ytdl.util.extractors.newpipe.potoken.JavascriptUtil.parseChallengeData
|
|
|
|
|
import com.deniscerri.ytdl.util.extractors.newpipe.potoken.JavascriptUtil.parseIntegrityTokenData
|
|
|
|
|
import com.deniscerri.ytdl.util.extractors.newpipe.potoken.JavascriptUtil.stringToU8
|
|
|
|
|
import com.deniscerri.ytdl.util.extractors.newpipe.potoken.JavascriptUtil.u8ToBase64
|
|
|
|
|
import com.google.gson.Gson
|
|
|
|
|
import kotlinx.coroutines.CoroutineExceptionHandler
|
|
|
|
|
import kotlinx.coroutines.CoroutineScope
|
|
|
|
|
import kotlinx.coroutines.Dispatchers
|
|
|
|
|
import kotlinx.coroutines.launch
|
|
|
|
|
import kotlinx.coroutines.suspendCancellableCoroutine
|
|
|
|
|
import kotlinx.coroutines.withContext
|
|
|
|
|
import okhttp3.Headers.Companion.toHeaders
|
|
|
|
|
import okhttp3.OkHttpClient
|
|
|
|
|
import okhttp3.RequestBody.Companion.toRequestBody
|
|
|
|
|
import java.time.Instant
|
|
|
|
|
import java.time.temporal.ChronoUnit
|
|
|
|
|
import java.util.Collections
|
|
|
|
|
import kotlin.coroutines.Continuation
|
|
|
|
|
import kotlin.coroutines.resume
|
|
|
|
|
import kotlin.coroutines.resumeWithException
|
|
|
|
|
|