No description
Find a file
robgibbons 555ff80de1
Merge pull request #1 from aljorhythm/master
add example with youtube-dl
2018-01-16 08:14:05 -05:00
LICENSE Initial commit 2015-04-16 00:33:26 -04:00
README.md add example with youtube-dl 2018-01-16 15:25:18 +08:00
youParse.py Updated documentation with Usage and Requires 2015-06-28 15:40:52 -04:00

YouParse.py

This is a forked (and fixed) version of youParse.py from SourceForge. The old version did not preserve the correct order of videos in provided YouTube playlists. I fixed this simple bug by using an OrderedDict instead of a plain old set.

I couldn't get in touch with the author, so I've forked the project here. This version of YouParse returns a properly ordered list of YouTube videos when passed a well-formed playlist URL.

Usage

First make sure you give youParse.py executable permissions.

sudo chmod +x youParse.py

YouParse takes a single YouTube playlist URL as its only argument. It outputs an ordered list of all video URLs from the provided playlist:

> youParse.py https://www.youtube.com/playlist?list=PLQ1MEo-qx100AhXAZxyQCjEbouXRcLYfb
http://www.youtube.com/watch?v=C1HAuXMua5s
http://www.youtube.com/watch?v=jQSuNdJmr60
http://www.youtube.com/watch?v=B9Y_FlIpP0k
http://www.youtube.com/watch?v=WdF_MQPuGLA
http://www.youtube.com/watch?v=zh4Z4QRN10s
http://www.youtube.com/watch?v=_sj1Rra0fIY
http://www.youtube.com/watch?v=VLOaXfVq5sk
http://www.youtube.com/watch?v=fX7jbMpJGp8
http://www.youtube.com/watch?v=UIvkFNaHEBw

Example with youtube-dl

To download last 10 videos in a playlist

python youParse.py https://www.youtube.com/watch\?v\=LsoLEjrDogU\&list\=PLx0sYbCqOb8TBPRdmBHs5Iftvv9TPboYG | tail -n 10 | xargs -n1 youtube-dl

Requires

YouParse requires Python 2.7 or greater.