-from __future__ import unicode_literals
-
-import re
-
from .common import InfoExtractor
from ..compat import compat_HTTPError
from ..utils import (
IE_NAME = '3qsdn'
IE_DESC = '3Q SDN'
_VALID_URL = r'https?://playout\.3qsdn\.com/(?P<id>[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12})'
+ _EMBED_REGEX = [r'<iframe[^>]+\b(?:data-)?src=(["\'])(?P<url>%s.*?)\1' % _VALID_URL]
_TESTS = [{
# https://player.3qsdn.com/demo.html
'url': 'https://playout.3qsdn.com/7201c779-6b3c-11e7-a40e-002590c750be',
'only_matching': True,
}]
- @staticmethod
- def _extract_url(webpage):
- mobj = re.search(
- r'<iframe[^>]+\b(?:data-)?src=(["\'])(?P<url>%s.*?)\1' % ThreeQSDNIE._VALID_URL, webpage)
- if mobj:
- return mobj.group('url')
+ def _extract_from_webpage(self, url, webpage):
+ for res in super()._extract_from_webpage(url, webpage):
+ yield {
+ **res,
+ '_type': 'url_transparent',
+ 'uploader': self._search_regex(r'^(?:https?://)?([^/]*)/.*', url, 'video uploader'),
+ }
def _real_extract(self, url):
video_id = self._match_id(url)