class DPlayIE(InfoExtractor):
- _VALID_URL = r'https?://(?P<domain>www\.(?P<host>dplay\.(?:dk|se|no)))/(?:videoer/)?(?P<id>[^/]+/[^/?#]+)'
+ _VALID_URL = r'https?://(?P<domain>www\.(?P<host>dplay\.(?P<country>dk|se|no)))/(?:video(?:er|s)/)?(?P<id>[^/]+/[^/?#]+)'
_TESTS = [{
# non geo restricted, via secure api, unsigned download hls URL
'format': 'bestvideo',
'skip_download': True,
},
+ }, {
+
+ 'url': 'https://www.dplay.dk/videoer/singleliv/season-5-episode-3',
+ 'only_matching': True,
+ }, {
+ 'url': 'https://www.dplay.se/videos/sofias-anglar/sofias-anglar-1001',
+ 'only_matching': True,
}]
def _real_extract(self, url):
display_id = mobj.group('id')
domain = mobj.group('domain')
+ self._initialize_geo_bypass({
+ 'countries': [mobj.group('country').upper()],
+ })
+
webpage = self._download_webpage(url, display_id)
video_id = self._search_regex(