Skip to content

Instantly share code, notes, and snippets.

View Ushnidaye's full-sized avatar

Ушнидае Ushnidaye

View GitHub Profile
@nanpuyue
nanpuyue / youtube-list.sh
Created March 13, 2014 15:00
用于获取youtube播放列表内的所有视频地址
#!/bin/bash
#
# e.g.
# for https://www.youtube.com/playlist?list=PLL7JeXQtCv0MslQgUCV3DvKmaagaB9Nms use:
# youtube-list.sh PLL7JeXQtCv0MslQgUCV3DvKmaagaB9Nms
for i in \
`curl -s "https://www.youtube.com/playlist?list=$1" |\
grep -Po "/watch.*?$1" |\
sed -r "s#&.*##" | uniq`;