[generic] Add support for Limelight API
authorremitamine <remitamine@gmail.com>
Sat, 30 Jan 2016 19:45:56 +0000 (20:45 +0100)
committerremitamine <remitamine@gmail.com>
Sat, 30 Jan 2016 19:45:56 +0000 (20:45 +0100)
youtube_dl/extractor/generic.py

index 26d3698c8b1e99a6899037a0a514e0a6480b2293..b18e734c4492832948e87f821a5377ec9d49026a 100644 (file)
@@ -1819,6 +1819,17 @@ class GenericIE(InfoExtractor):
         if digiteka_url:
             return self.url_result(self._proto_relative_url(digiteka_url), DigitekaIE.ie_key())
 
+        # Look for Limelight embeds
+        mobj = re.search(r'LimelightPlayer\.doLoad(Media|Channel|ChannelList)\(["\'](?P<id>[a-z0-9]{32})', webpage)
+        if mobj:
+            lm = {
+                'Media': 'media',
+                'Channel': 'channel',
+                'ChannelList': 'channel_list',
+            }
+            return self.url_result('limelight:%s:%s' % (
+                lm[mobj.group(1)], mobj.group(2)), 'Limelight%s' % mobj.group(1), mobj.group(2))
+
         # Look for AdobeTVVideo embeds
         mobj = re.search(
             r'<iframe[^>]+src=[\'"]((?:https?:)?//video\.tv\.adobe\.com/v/\d+[^"]+)[\'"]',