#!/bin/bash # # By # _BASEURL="http://www.youtube.com" _BASEURL_ENCODED="http%3A//www.youtube.com" _URL_VIDEODOWNLOADER="http://videodownloader.net/get/?url=" _INITPATH="/profile_videos?user=" _USERPATH_1="/profile_videos?user=" _USERPATH_2="&p=r&page=" if [ -z $1 ]; then echo "ERROR: USE: $0 "; exit; else _URL=`echo $_BASEURL$_INITPATH$1`; _URL_PAGER=`echo $_BASEURL$_USERPATH_1$1$_USERPATH_2` fi if [ -z $2 ]; then echo "USE: $0 "; exit; else _DIR=`echo $2`; fi ## # get num of videos _TOTAL_VIDEOS=`GET "$_URL" |grep -i videos |grep '-' |grep -i of |awk -F ' ' '{print $6}'`; if [ -z $_TOTAL_VIDEOS ]; then echo echo "Nothing found"; echo exit 0; else echo echo "Found $_TOTAL_VIDEOS videos" echo fi ## # total of pages _TOTAL_PAGES=`echo "$_TOTAL_VIDEOS / 20"|bc` _TOTAL_PAGES=`echo "$_TOTAL_PAGES + 1" |bc` echo echo "Found $_TOTAL_PAGES pages"; echo if [ "$_TOTAL_PAGES" == "0" ]; then echo echo "Done"; echo exit 0; else for i in `seq 1 $_TOTAL_PAGES`; do echo echo "Page number $i " echo _VIDEOS=(`GET "$_URL_PAGER$i" |grep -i 'watch?v='|grep -i onclick |grep -i '