aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/vbox7.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-08-17 01:02:59 +0700
committerSergey M․ <dstftw@gmail.com>2016-08-17 01:02:59 +0700
commit2a1321a272c7b410db25654cdfdc33c3cd8bd440 (patch)
tree3d69b6fd44c5509c69f099e8eeb2ffa940a02cff /youtube_dl/extractor/vbox7.py
parent9c0fa60bf375959c7d8582f655b441c534865c03 (diff)
[vbox7:generic] Add support for vbox7 embeds
Diffstat (limited to 'youtube_dl/extractor/vbox7.py')
-rw-r--r--youtube_dl/extractor/vbox7.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/youtube_dl/extractor/vbox7.py b/youtube_dl/extractor/vbox7.py
index 8e6d7efe7..e17988573 100644
--- a/youtube_dl/extractor/vbox7.py
+++ b/youtube_dl/extractor/vbox7.py
@@ -1,6 +1,8 @@
# encoding: 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)