bulkupdate

This commit is contained in:
Tobias Kessels
2018-08-10 16:48:08 +02:00
parent 5636db4ffb
commit c27610ad19
5 changed files with 34 additions and 1 deletions

13
youtube_resolve.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/bash
url=$(echo -ne "${*}" | grep -Pio -m1 'https://www.youtube.com/watch\?[^&|]+')
title=$(wget -q -O- "${url}" | grep -Po "(?<=title>).*(?=</title)")
title_parsed=$(cat <<eof | python3
from urllib.parse import unquote
import html
import sys
url="${title}"
print(html.unescape(unquote(url)))
eof
)
echo "${*};\"${title_parsed}\""