Created
August 17, 2010 13:02
-
-
Save tobbez/529831 to your computer and use it in GitHub Desktop.
youtube-rip-channel.py
This file contains 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Copyright 2010, Torbjörn Lönnemark | |
import feedparser | |
import sys | |
def main(): | |
if len(sys.argv) != 2: | |
print "Usage: " + sys.argv[0] + " <channel-name>" | |
return | |
channel_name = sys.argv[1] | |
for i in xrange(10): | |
offset = 1 + i * 50 | |
url = 'http://gdata.youtube.com/feeds/base/users/' + channel_name + '/uploads?alt=rss&v=2&orderby=published&client=ytapi-youtube-profile&max-results=50&start-index=' + str(offset) | |
feed = feedparser.parse(url) | |
for entry in feed.entries: | |
print entry.link | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment