Youtube-dl

Youtube=-l Playlist

youtube-dl -cit “http://www.youtube.com/playlist?list=PLFEynmsUAifjIb26LxSPLn0t6d63oq-s7

-c resumes dls

-i continue on download errors

-t use title in

YoutubeTricks

Get Youtube Real Url

Shell Command:


YT_LISTS=$(wget --user-agent="Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:26.0) Gecko/20100101 Firefox/26.0" -qO- -c "http://www.youtube.com/watch?v=SEfhM3T4aV0" | grep ytplayer.config | sed "s/;/\\`echo -e '\n\r'`/g" | grep url_encoded_fmt_stream_map | sed 's/.*url_encoded_fmt_stream_map": "\([^"]*\)".*/\1/' | sed "s/,/\\`echo -e '\n\r'`/g" | sed -e 's/%3A/:/g' -e 's/%2F/\//g' -e 's/%3F/\?/g' -e 's/%3D/=/g' -e 's/%26/\&/g' -e 's/%252C/,/g' | sed -e 's/\\u0026/|/g' -e 's/$/|/g')

echo "${YT_LISTS}">./YT_LISTS.log

for YT_ITEM in $(cat ./YT_LISTS.log)
do
#echo "****************"
#echo ${YT_ITEM}
YT_URL=$(echo "${YT_ITEM}" | sed 's/.*url=\([^|]*\)|.*/\1\&signature=/')
#echo "Youtube URL: " ${YT_URL}
YT_SIG=$(echo "${YT_ITEM}" | sed 's/.*sig=\([^|]*\)|.*/\1/')
#echo "Youtube Signature: " ${YT_SIG}
echo ${YT_URL}${YT_SIG}
done

Reference: http://www.w3schools.com/tags/ref_urlencode.asp

Old Shell Command doesnt work:


wget -qO- -c "http://www.youtube.com/watch?v=SEfhM3T4aV0" | grep ytplayer.config | sed "s/;/\\`echo -e '\n\r'`/g" | grep url_encoded_fmt_stream_map | sed -e 's/%7C/|/g' -e 's/%253A/:/g' -e 's/%3A/:/g' -e 's/%252C/,/g' -e 's/%2522/\"/g' -e 's/%253B/;/g' -e 's/%3B/;/g' -e 's/%252F/\//g' -e 's/%2F/\//g' -e 's/%253F/\?/g' -e 's/%3F/\?/g'  -e 's/%253D/=/g' -e 's/%3D/=/g' -e 's/%2B/+/g' -e 's/%25252C/,/g' -e 's/%2526/\&/g' -e 's/%26/\&/g' -e 's/%2C/|/g' |  sed "s/|/\\`echo -e '\n\r'`/g" | sed -e 's/\\\//\//g' -e 's/\\u0026/\&/g'|  grep -o "http:.*" | grep mp4 | tail -1 | cut -d";" -f1


wget -qO- -c "http://www.youtube.com/watch?v=SEfhM3T4aV0" | grep "yt.preload.start" | tr '"' '\n' | grep "generate_204" | sed -e 's/\\\//\//g' -e 's/\\u0026/\&/g' | sed  's|generate_204|videoplayback|g'
wget -qO- -c "http://www.youtube.com/watch?v=SEfhM3T4aV0" | grep videoplayback | grep "embed type" | sed "s/;/\\`echo -e '\n\r'`/g" | grep url_encoded_fmt_stream_map | sed -e 's/%7C/|/g' -e 's/%253A/:/g' -e 's/%252C/,/g' -e 's/%2522/\"/g' -e 's/%253B/;/g' -e 's/%252F/\//g' -e 's/%253F/\?/g'  -e 's/%253D/=/g' -e 's/%3D/=/g' -e 's/%2B/+/g' -e 's/%25252C/,/g' -e 's/%2526/\&/g' -e 's/%26/\&/g' -e 's/%2C/|/g' |  sed "s/|/\\`echo -e '\n\r'`/g" |  grep -o "http:.*" | grep mp4 | tail -1 | cut -d";" -f1

Output:

http://r3---sn-4g57knl6.googlevideo.com/videoplayback?mt=1391271738&itag=43&id=4847e13374f8695d&ms=au&fexp=941249,933609,936910,936913&mv=m&expire=1391297316&sver=3&ip=87.0.166.110&key=yt5&upn=3Q2bkn5T318&source=youtube&sparams=id,ip,ipbits,itag,ratebypass,source,upn,expire&ipbits=0&ratebypass=yes&signature=9B35D42E10257D24D11B1D38F00490AF54124930.467CDE9A75E7186717F92051EBE181B59E661C5F
http://r3---sn-4g57knl6.googlevideo.com/videoplayback?mt=1391271738&itag=18&id=4847e13374f8695d&ms=au&fexp=941249,933609,936910,936913&mv=m&expire=1391297316&sver=3&ip=87.0.166.110&key=yt5&upn=3Q2bkn5T318&source=youtube&sparams=id,ip,ipbits,itag,ratebypass,source,upn,expire&ipbits=0&ratebypass=yes&signature=67EEFB694D948E7D22F25A2CA85F257C3CD0A1EE.255DFACCE30695F295AF880FE381C174AA238EA0
http://r3---sn-4g57knl6.googlevideo.com/videoplayback?mt=1391271738&itag=5&burst=40&ms=au&fexp=941249,933609,936910,936913&mv=m&expire=1391297316&sver=3&ip=87.0.166.110&key=yt5&algorithm=throttle-factor&upn=3Q2bkn5T318&source=youtube&id=4847e13374f8695d&ipbits=0&factor=1.25&sparams=algorithm,burst,factor,id,ip,ipbits,itag,source,upn,expire&signature=CD14F9C2064D4B36B9C4379FFD5C53063D9DF36E.1BDECEA21FFD33011493064B4A9074BC9582FDC6
http://r3---sn-4g57knl6.googlevideo.com/videoplayback?mt=1391271738&itag=36&burst=40&ms=au&fexp=941249,933609,936910,936913&mv=m&expire=1391297316&sver=3&ip=87.0.166.110&key=yt5&algorithm=throttle-factor&upn=3Q2bkn5T318&source=youtube&id=4847e13374f8695d&ipbits=0&factor=1.25&sparams=algorithm,burst,factor,id,ip,ipbits,itag,source,upn,expire&signature=F4F9279CF5681722638F4365C6B399365FAF4FC9.DC6049369E0297FF611CFB740C2AC1D34702AEC4
http://r3---sn-4g57knl6.googlevideo.com/videoplayback?mt=1391271738&itag=17&burst=40&ms=au&fexp=941249,933609,936910,936913&mv=m&expire=1391297316&sver=3&ip=87.0.166.110&key=yt5&algorithm=throttle-factor&upn=3Q2bkn5T318&source=youtube&id=4847e13374f8695d&ipbits=0&factor=1.25&sparams=algorithm,burst,factor,id,ip,ipbits,itag,source,upn,expire&signature=876100A702C29EFDE6B6BBB5678A8D52AA5F7EE1.9DD43834448EA44303813E454E96282753034F5A

Link:

http://en.wikipedia.org/wiki/YouTube

Get Youtube Long Title and add .flv

Shell Command:

wget -qO- -c "http://www.youtube.com/watch?v=SEfhM3T4aV0" |  grep long-title | cut -d\" -f8 | sed -e 's,$,.flv,'

Output:

Hello Goodbye The Beatles Kids Music  Songs Dance Shows Videos Kids TV show kidz.flv

Get Youtube Search Links

Shell Command:

wget -qO- -c "http://www.youtube.com/results?search_query=english+kids&page=1" | grep result-item-thumb | cut -d\"  -f2 | grep watch | sed -e 's,^,http://www.youtube.com,'

Output:

http://www.youtube.com/watch?v=N5bEbgBBAyU
http://www.youtube.com/watch?v=vwCwj21MdlY
http://www.youtube.com/watch?v=uXip5wNE9P0
http://www.youtube.com/watch?v=CVuKr5y9AbY
http://www.youtube.com/watch?v=LZbD4-usGm0
http://www.youtube.com/watch?v=hx8i-Wq_jtc
http://www.youtube.com/watch?v=nuB5WDLn31c
http://www.youtube.com/watch?v=Pf-WA5ufk78
http://www.youtube.com/watch?v=SA_zWo5LGF0
http://www.youtube.com/watch?v=vlXUtNFakvU
http://www.youtube.com/watch?v=xA8wmqPI63M
http://www.youtube.com/watch?v=4ZZGIw7FZgQ
http://www.youtube.com/watch?v=RPTYzri5Iqs
http://www.youtube.com/watch?v=SZLaZyMpfUI
http://www.youtube.com/watch?v=MLXZV456Or0
http://www.youtube.com/watch?v=PF4QkY1eyMA
http://www.youtube.com/watch?v=SB-S_wz49rI
http://www.youtube.com/watch?v=3n2EIBDsYUw
http://www.youtube.com/watch?v=j62HR5lNpzw
http://www.youtube.com/watch?v=xlcv_7Fy2Hw

Get Youtube User Channel Links

Shell Command:

wget -qO- -c "http://www.youtube.com/user/wearebusybeavers#p/u" | sed "s/>/>\\`echo -e '\n\r'`/g" | grep "ux-thumb-wrap contains-addto" | egrep -o "\/watch\?v=..........."  | sed -e 's,^,http://www.youtube.com,'  | wc -l

Output:

50

Get Youtube Playlist Links

Shell Command:

wget -qO- -c "http://www.youtube.com/view_play_list?p=72FC94998C87546F&playnext=1" | grep data-list-id | cut -d\" -f12 | sed "s/,/\\`echo -e '\n\r'`/g" | awk '{ print "http://www.youtube.com/watch?v="substr($0,2,11) }' | wc -l

Output:

114
youtubetricks/main.txt · Last modified: 2014/11/08 14:30 by rkpisanu
www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0





Mail