projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[youtube] fix extraction for embed restricted live streams(fixes #16433)
[youtube-dl]
/
youtube_dl
/
extractor
/
dplay.py
diff --git
a/youtube_dl/extractor/dplay.py
b/youtube_dl/extractor/dplay.py
index 2840636e51ed9b2af826243f45c96bac1f5702de..8e0374320783195c810d1be8fff7d44b95b32414 100644
(file)
--- a/
youtube_dl/extractor/dplay.py
+++ b/
youtube_dl/extractor/dplay.py
@@
-26,7
+26,7
@@
from ..utils import (
class DPlayIE(InfoExtractor):
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
_TESTS = [{
# non geo restricted, via secure api, unsigned download hls URL
@@
-88,6
+88,13
@@
class DPlayIE(InfoExtractor):
'format': 'bestvideo',
'skip_download': True,
},
'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):
}]
def _real_extract(self, url):
@@
-95,6
+102,10
@@
class DPlayIE(InfoExtractor):
display_id = mobj.group('id')
domain = mobj.group('domain')
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(
webpage = self._download_webpage(url, display_id)
video_id = self._search_regex(