-
-
Save jackberry/96cd92eaf86e5af5ca0ffc0dd07e91db to your computer and use it in GitHub Desktop.
用于获取youtube播放列表内的所有视频地址
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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`; | |
do | |
echo "https://www.youtube.com$i" >> list.txt | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment