Skip to content

Commit cecf178

Browse files
committed
youtube shorts download support
1 parent 1a6ab55 commit cecf178

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/kotlin/dev/storozhenko/familybot/feature/download/executors/TikTokDownloadExecutor.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class TikTokDownloadExecutor(
8585
}
8686

8787
private fun containsUrl(text: String): Boolean {
88-
return isIG(text) || isTikTok(text) || isVk(text)
88+
return isIG(text) || isTikTok(text) || isVk(text) || isYtShort(text)
8989
}
9090

9191
private fun isTikTok(text: String) = text.contains("tiktok", ignoreCase = true)
@@ -94,6 +94,8 @@ class TikTokDownloadExecutor(
9494

9595
private fun isIG(text: String) = text.contains("instagram.com", ignoreCase = true) && text.contains("/reel/", ignoreCase = true)
9696

97+
private fun isYtShort(text: String) = text.contains("youtube.com/shorts/", ignoreCase = true)
98+
9799
private fun downloadIG(url: String): String {
98100
val request = Request.Builder()
99101
.url(C.dc("l5VKR[9`b1E)N.yplMn<5+]{*T80x.PiWu9aU<B1m\$c%pE"))

0 commit comments

Comments
 (0)