[extractor/generic] Add support for theplatform embeds (Closes #8636, closes #9476)
authorSergey M․ <dstftw@gmail.com>
Sun, 22 May 2016 00:52:39 +0000 (06:52 +0600)
committerSergey M․ <dstftw@gmail.com>
Sun, 22 May 2016 00:52:39 +0000 (06:52 +0600)
youtube_dl/extractor/generic.py

index c368f08e1345e81b11f331e202acf07f21893642..ad6a40730c3d08cc882f1067f58c8adfdef7a2be 100644 (file)
@@ -62,6 +62,7 @@ from .digiteka import DigitekaIE
 from .instagram import InstagramIE
 from .liveleak import LiveLeakIE
 from .threeqsdn import ThreeQSDNIE
+from .theplatform import ThePlatformIE
 
 
 class GenericIE(InfoExtractor):
@@ -1499,6 +1500,11 @@ class GenericIE(InfoExtractor):
         if bc_urls:
             return _playlist_from_matches(bc_urls, ie='BrightcoveNew')
 
+        # Look for ThePlatform embeds
+        tp_urls = ThePlatformIE._extract_urls(webpage)
+        if tp_urls:
+            return _playlist_from_matches(tp_urls, ie='ThePlatform')
+
         # Look for embedded rtl.nl player
         matches = re.findall(
             r'<iframe[^>]+?src="((?:https?:)?//(?:www\.)?rtl\.nl/system/videoplayer/[^"]+(?:video_)?embed[^"]+)"',