[vbox7:generic] Add support for vbox7 embeds

This commit is contained in:
Sergey M․ 2016-08-17 01:02:59 +07:00
parent 9c0fa60bf3
commit 2a1321a272
No known key found for this signature in database
GPG key ID: 2C393E0F18A9236D
2 changed files with 28 additions and 0 deletions

View file

@ -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)