Support for YouTube playlists
This commit is contained in:
parent
6db787e8b5
commit
2ceba6d99f
|
@ -161,6 +161,9 @@ def normalize_feed_url(url):
|
|||
'yt:': 'http://www.youtube.com/rss/user/%s/videos.rss',
|
||||
'sc:': 'http://soundcloud.com/%s',
|
||||
'fm4od:': 'http://onapp1.orf.at/webcam/fm4/fod/%s.xspf',
|
||||
# YouTube playlists. To get a list of playlists per-user, use:
|
||||
# https://gdata.youtube.com/feeds/api/users/<username>/playlists
|
||||
'ytpl:': 'http://gdata.youtube.com/feeds/api/playlists/%s',
|
||||
}
|
||||
|
||||
for prefix, expansion in PREFIXES.iteritems():
|
||||
|
|
|
@ -137,6 +137,10 @@ def get_youtube_id(url):
|
|||
if r is not None:
|
||||
return r.group(1)
|
||||
|
||||
r = re.compile('http://(?:[a-z]+\.)?youtube\.com/v/(.*)[?]', re.IGNORECASE).match(url)
|
||||
if r is not None:
|
||||
return r.group(1)
|
||||
|
||||
return None
|
||||
|
||||
def is_video_link(url):
|
||||
|
|
Loading…
Reference in New Issue