Initial commit to YouTuber adding the first few tools

master
silverwizard 2 years ago
parent aa87a1ad57
commit e8f6b459ed
  1. 4
      ytchantolist.sh
  2. 11
      ytlist.sh
  3. 17
      ytmeta.sh
  4. 2
      ytsearch.sh
  5. 35
      yttorss.sh

@ -0,0 +1,4 @@
for file in $(curl `./yttorss.sh -c $1`| grep media:content | cut -d'"' -f 2| cut -d'?' -f1)
do
./ytmeta.sh $file
done|./ytlist.sh

@ -0,0 +1,11 @@
#!/bin/sh
NUM=0
IFS=';'
zenity --list --imagelist --hide-column=3 --print-column=3 --column=Thumb --column=Title --column=Link `while read img title link
do
NUM=$((NUM+1))
wget --quiet -O $NUM.jpg $img
printf $NUM.jpg\;"$title"\;"$link"\;
done;wait`
rm *.jpg

@ -0,0 +1,17 @@
#!/bin/bash
if [ "${1#*$'watch?v='}" != "$1" ]
then
VIDID=`echo $1|awk -F '=' '{print $NF}'`
else
VIDID=`echo $1|awk -F '/' '{print $NF}'`
fi
printf https://img.youtube.com/vi/$VIDID/0.jpg\;
printf "`curl -s https://www.youtube.com/watch?v=$VIDID|tr "\<" "\n"|grep -e "og:title"|cut -d'"' -f4|tr -d '[:punct:]'`"
printf \;
echo https://www.youtube.com/watch?v=$VIDID\;

@ -0,0 +1,2 @@
for vid in `curl https://www.youtube.com/results?search_query=$(echo $@|tr ' ' '+')|tr '"' '\n'|grep 'watch?'|cut -d '\' -f1|sort|uniq`; do ./ytmeta.sh youtube.com$vid ; done|./ytlist.sh ^C

@ -0,0 +1,35 @@
#!/bin/sh
usage() {
echo "youtuber
-c [channel name]
-u [channel url]"
echo "you may only specify channel name or url, and must specify one"
}
if [ $#@ != 2 ]
then
usage()
exit 127
fi
while getopts "u:c:" opt; do
case "$opt" in
u)
URL=$2
shift
;;
c)
URL=https://www.youtube.com/$2
shift
;;
*)
usage()
exit 127
;;
esac
done
shift $((OPTIND-1))
RSS=`curl -s $URL |tr ':' '\n'|grep -A 2 rssUrl|tail -1 |cut -d'"' -f1|cut -d'/' -f3,4,5`
echo $RSS
Loading…
Cancel
Save