added support for embed Youtube-URLs to youtube_resolve.sh
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
url=$(echo -ne "${*}" | grep -Pio -m1 'https://www.youtube.com/watch\?[^&|]+')
|
url=$(echo -ne "${*}" | grep -Pio -m1 'https://www.youtube.com/(watch\?[^&|]+|embed/[^?/,|]+)')
|
||||||
title=$(wget -q -O- "${url}" | grep -Po "(?<=title>).*(?=</title)")
|
title=$(wget -q -O- "${url}" | grep -Po "(?<=title>).*(?=</title)")
|
||||||
title_parsed=$(cat <<eof | python3
|
title_parsed=$(cat <<eof | python3
|
||||||
from urllib.parse import unquote
|
from urllib.parse import unquote
|
||||||
|
|||||||
Reference in New Issue
Block a user