ref: 7f2e1ae8748df1fed378180929bdb203aae7f64c
parent: 9de2b8928e40459a0779d71a7d8eb1e182098d05
author: qwx <qwx@sciops.net>
date: Thu Aug 5 07:20:38 EDT 2021
add ytpl: extract youtube playlist info
--- /dev/null
+++ b/bin/ytpl
@@ -1,0 +1,12 @@
+#!/bin/rc
+# thanks umbraticus
+# fun: #!/bin/rc\n$*
+# let me know if there's a better solution with tee(1)
+rfork n
+fn nv{ echo $1; nvi -i $1 }
+for(i in $*){
+ hget 'https://www.youtube.com/feeds/videos.xml?channel_id='^$i |\
+ sed -n 's/.*<id>yt:video:(.*)<\/id>.*/\1/p' |\
+ xargs -n 1 fun nv
+ echo
+}