diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-05-02 07:13:24 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-05-02 07:13:24 +0900 |
| commit | 3a0d331755bd9c1d7a4f3e858d42e902b8a7c3eb (patch) | |
| tree | 4ebe3f1bb6f38fa9b4e6059d87745c5868c2f56e /ar/.local/bin/qndl | |
| parent | 4d4aab0553c3ec9cf1fde6244e69253076d4144c (diff) | |
modified bin/qndl
Diffstat (limited to 'ar/.local/bin/qndl')
| -rwxr-xr-x | ar/.local/bin/qndl | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ar/.local/bin/qndl b/ar/.local/bin/qndl index 6cf3053..f522ec3 100755 --- a/ar/.local/bin/qndl +++ b/ar/.local/bin/qndl @@ -25,11 +25,17 @@ get_cookies() { esac } +normalize_url() { + # yt-dlp's `soop` extractor only matches sooplive.co.kr / afreecatv.com, + # so rewrite the newer sooplive.com domain to .co.kr. + printf '%s' "$1" | sed 's|\.sooplive\.com/|.sooplive.co.kr/|' +} + get_url() { for _arg in "$@"; do case "$_arg" in https://* | http://*) - printf '%s' "$_arg" + normalize_url "$_arg" return 0 ;; esac @@ -37,7 +43,7 @@ get_url() { _clip="$(xclip -selection clipboard -o 2>/dev/null)" case "$_clip" in https://* | http://*) - printf '%s' "$_clip" + normalize_url "$_clip" return 0 ;; esac |
