[DBTV:generic] Add support for embeds

This commit is contained in:
Déstin Reed 2016-08-17 12:45:24 +02:00 committed by Sergey M․
parent 51815886a9
commit b0c8f2e9c8
No known key found for this signature in database
GPG key ID: 2C393E0F18A9236D
2 changed files with 17 additions and 0 deletions

View file

@ -38,6 +38,12 @@ class DBTVIE(InfoExtractor):
'only_matching': True,
}]
@staticmethod
def _extract_urls(webpage):
return [url for _, url in re.findall(
r'<iframe[^>]+src=(["\'])((?:https?:)?//(?:www\.)?dbtv\.no/lazyplayer/\d+.*?)\1',
webpage)]
def _real_extract(self, url):
video_id, display_id = re.match(self._VALID_URL, url).groups()