[skip ci] refactor: Remove (most) unnecessary .use block usages (#2841)
Co-authored-by: jmir1 <jhmiramon@gmail.com>
This commit is contained in:
@ -8,7 +8,7 @@ import okhttp3.OkHttpClient
|
||||
class BloggerExtractor(private val client: OkHttpClient) {
|
||||
fun videosFromUrl(url: String, headers: Headers, suffix: String = ""): List<Video> {
|
||||
return client.newCall(GET(url, headers)).execute()
|
||||
.use { it.body.string() }
|
||||
.body.string()
|
||||
.takeIf { !it.contains("errorContainer") }
|
||||
.let { it ?: return emptyList() }
|
||||
.substringAfter("\"streams\":[")
|
||||
|
Reference in New Issue
Block a user