aboutsummaryrefslogtreecommitdiffstats
path: root/hypervideo_dl/extractor/drtv.py
diff options
context:
space:
mode:
Diffstat (limited to 'hypervideo_dl/extractor/drtv.py')
-rw-r--r--hypervideo_dl/extractor/drtv.py51
1 files changed, 37 insertions, 14 deletions
diff --git a/hypervideo_dl/extractor/drtv.py b/hypervideo_dl/extractor/drtv.py
index 37e4d5b..128f439 100644
--- a/hypervideo_dl/extractor/drtv.py
+++ b/hypervideo_dl/extractor/drtv.py
@@ -1,6 +1,3 @@
-# coding: utf-8
-from __future__ import unicode_literals
-
import binascii
import hashlib
import re
@@ -26,7 +23,7 @@ class DRTVIE(InfoExtractor):
_VALID_URL = r'''(?x)
https?://
(?:
- (?:www\.)?dr\.dk/(?:tv/se|nyheder|radio(?:/ondemand)?)/(?:[^/]+/)*|
+ (?:www\.)?dr\.dk/(?:tv/se|nyheder|(?:radio|lyd)(?:/ondemand)?)/(?:[^/]+/)*|
(?:www\.)?(?:dr\.dk|dr-massive\.com)/drtv/(?:se|episode|program)/
)
(?P<id>[\da-z_-]+)
@@ -54,6 +51,7 @@ class DRTVIE(InfoExtractor):
'release_year': 2016,
},
'expected_warnings': ['Unable to download f4m manifest'],
+ 'skip': 'this video has been removed',
}, {
# embed
'url': 'https://www.dr.dk/nyheder/indland/live-christianias-rydning-af-pusher-street-er-i-gang',
@@ -74,31 +72,41 @@ class DRTVIE(InfoExtractor):
# with SignLanguage formats
'url': 'https://www.dr.dk/tv/se/historien-om-danmark/-/historien-om-danmark-stenalder',
'info_dict': {
- 'id': 'historien-om-danmark-stenalder',
+ 'id': '00831690010',
'ext': 'mp4',
'title': 'Historien om Danmark: Stenalder',
'description': 'md5:8c66dcbc1669bbc6f873879880f37f2a',
'timestamp': 1546628400,
'upload_date': '20190104',
- 'duration': 3502.56,
+ 'duration': 3504.618,
'formats': 'mincount:20',
+ 'release_year': 2017,
+ 'season_id': 'urn:dr:mu:bundle:5afc03ad6187a4065ca5fd35',
+ 'season_number': 1,
+ 'season': 'Historien om Danmark',
+ 'series': 'Historien om Danmark',
},
'params': {
'skip_download': True,
},
}, {
- 'url': 'https://www.dr.dk/radio/p4kbh/regionale-nyheder-kh4/p4-nyheder-2019-06-26-17-30-9',
+ 'url': 'https://www.dr.dk/lyd/p4kbh/regionale-nyheder-kh4/p4-nyheder-2019-06-26-17-30-9',
'only_matching': True,
}, {
'url': 'https://www.dr.dk/drtv/se/bonderoeven_71769',
'info_dict': {
'id': '00951930010',
'ext': 'mp4',
- 'title': 'Bonderøven (1:8)',
- 'description': 'md5:3cf18fc0d3b205745d4505f896af8121',
- 'timestamp': 1546542000,
- 'upload_date': '20190103',
+ 'title': 'Bonderøven 2019 (1:8)',
+ 'description': 'md5:b6dcfe9b6f0bea6703e9a0092739a5bd',
+ 'timestamp': 1603188600,
+ 'upload_date': '20201020',
'duration': 2576.6,
+ 'season': 'Bonderøven 2019',
+ 'season_id': 'urn:dr:mu:bundle:5c201667a11fa01ca4528ce5',
+ 'release_year': 2019,
+ 'season_number': 2019,
+ 'series': 'Frank & Kastaniegaarden'
},
'params': {
'skip_download': True,
@@ -112,6 +120,24 @@ class DRTVIE(InfoExtractor):
}, {
'url': 'https://www.dr.dk/drtv/program/jagten_220924',
'only_matching': True,
+ }, {
+ 'url': 'https://www.dr.dk/lyd/p4aarhus/regionale-nyheder-ar4/regionale-nyheder-2022-05-05-12-30-3',
+ 'info_dict': {
+ 'id': 'urn:dr:mu:programcard:6265cb2571401424d0360113',
+ 'title': "Regionale nyheder",
+ 'ext': 'mp4',
+ 'duration': 120.043,
+ 'series': 'P4 Østjylland regionale nyheder',
+ 'timestamp': 1651746600,
+ 'season': 'Regionale nyheder',
+ 'release_year': 0,
+ 'season_id': 'urn:dr:mu:bundle:61c26889539f0201586b73c5',
+ 'description': '',
+ 'upload_date': '20220505',
+ },
+ 'params': {
+ 'skip_download': True,
+ },
}]
def _real_extract(self, url):
@@ -274,8 +300,6 @@ class DRTVIE(InfoExtractor):
'Unfortunately, DR is not allowed to show this program outside Denmark.',
countries=self._GEO_COUNTRIES)
- self._sort_formats(formats)
-
return {
'id': video_id,
'title': title,
@@ -340,7 +364,6 @@ class DRTVLiveIE(InfoExtractor):
formats.extend(self._extract_f4m_formats(update_url_query(
'%s/%s' % (server, stream_path), {'hdcore': '3.7.0'}),
channel_id, f4m_id=link_type, fatal=False))
- self._sort_formats(formats)
return {
'id': channel_id,