Permalink
Browse files

Adds RSS feed support for YouTube video feeds from users. For example h…

…ttp://www.youtube.com/rss/user/AtheistFoundation/videos.rss would be accepted and all videos are downloadable.
  • Loading branch information...
1 parent 40ffee2 commit 954f1e8119ac596ec0734c19d887f970f2f3a3ec @managementboy committed Jun 7, 2012
Showing with 18 additions and 0 deletions.
  1. +18 −0 syndication.py
  2. BIN syndication.pyc
View
@@ -174,6 +174,8 @@ def Sync(db, xmlfile, title, out=sys.stdout):
if not done and entry.has_key('link'):
+ if FLAGS.verbose:
+ out.write('%s' %(entry['link']))
if entry['link'].startswith('magnet'):
if FLAGS.verbose:
out.write(' Warning: treating the link as if it where a Magnet link\n')
@@ -189,6 +191,22 @@ def Sync(db, xmlfile, title, out=sys.stdout):
out=out)
done = True
+ # handle youtube rss feeds
+ if not done and entry['link'].startswith('http://www.youtube'):
+ if FLAGS.verbose:
+ out.write(' Warning: looks like a YouTube video link\n')
+ Download(db,
+ entry['link'],
+ utility.hashtitlesubtitle(title, subtitle),
+ 'application/x-shockwave-flash',
+ title,
+ subtitle,
+ description,
+ entry.date,
+ entry.date_parsed,
+ out=out)
+ done = True
+
if not done and videos.has_key('text/html'):
db.Log('Warning: Treating text/html as an video enclosure type for '
'%s' % utility.hashtitlesubtitle(title, subtitle))
View
Binary file not shown.

0 comments on commit 954f1e8

Please sign in to comment.