Unify coding cookie
[youtube-dl] / youtube_dl / extractor / vbox7.py
index 8e6d7efe72183d9ebbe6d3f14a535d26f4c0690a..a1e0851b7424e4c73cd34b72c02f16bc1905b6ce 100644 (file)
@@ -1,6 +1,8 @@
-# encoding: utf-8
+# coding: utf-8
 from __future__ import unicode_literals
 
+import re
+
 from .common import InfoExtractor
 from ..utils import urlencode_postdata
 
@@ -29,6 +31,14 @@ class Vbox7IE(InfoExtractor):
         'only_matching': True,
     }]
 
+    @staticmethod
+    def _extract_url(webpage):
+        mobj = re.search(
+            '<iframe[^>]+src=(?P<q>["\'])(?P<url>(?:https?:)?//vbox7\.com/emb/external\.php.+?)(?P=q)',
+            webpage)
+        if mobj:
+            return mobj.group('url')
+
     def _real_extract(self, url):
         video_id = self._match_id(url)