[tnaflixnetwork:embed] Add _extract_urls
authorSergey M․ <dstftw@gmail.com>
Sat, 27 Feb 2016 11:15:06 +0000 (17:15 +0600)
committerSergey M․ <dstftw@gmail.com>
Sat, 27 Feb 2016 11:15:06 +0000 (17:15 +0600)
youtube_dl/extractor/tnaflix.py

index e8c2727045bdd4325d480654c7f28dcceaaa19bd..79f036fe4eca77f57ddd9e1fd912317f9af00ba5 100644 (file)
@@ -175,6 +175,12 @@ class TNAFlixNetworkEmbedIE(TNAFlixNetworkBaseIE):
         'only_matching': True,
     }]
 
+    @staticmethod
+    def _extract_urls(webpage):
+        return [url for _, url in re.findall(
+            r'<iframe[^>]+?src=(["\'])(?P<url>(?:https?:)?//player\.(?:tna|emp)flix\.com/video/\d+)\1',
+            webpage)]
+
 
 class TNAFlixIE(TNAFlixNetworkBaseIE):
     _VALID_URL = r'https?://(?:www\.)?tnaflix\.com/[^/]+/(?P<display_id>[^/]+)/video(?P<id>\d+)'