1
0
mirror of https://github.com/l1ving/youtube-dl synced 2025-03-10 03:57:25 +08:00

fixed error when parsing fm4 url

removed if clause for special fm4 show_id handling, as url has
been changed to a new format where the station is natively correct.

updated only test url of ORFRadio Extractor. While other
extractors are not updated because they worked with a simple test
in the console with random current links and the links would get
invalid again quickly anyway in a short time.
This commit is contained in:
Johannes 2020-01-02 10:30:38 +01:00
parent ca069f6881
commit bcc6d8530c

View File

@ -161,9 +161,6 @@ class ORFRadioIE(InfoExtractor):
show_date = mobj.group('date') show_date = mobj.group('date')
show_id = mobj.group('show') show_id = mobj.group('show')
if station == 'fm4':
show_id = '4%s' % show_id
data = self._download_json( data = self._download_json(
'http://audioapi.orf.at/%s/api/json/current/broadcast/%s/%s' % (station, show_id, show_date), 'http://audioapi.orf.at/%s/api/json/current/broadcast/%s/%s' % (station, show_id, show_date),
show_id show_id
@ -198,16 +195,16 @@ class ORFFM4IE(ORFRadioIE):
_VALID_URL = r'https?://(?P<station>fm4)\.orf\.at/player/(?P<date>[0-9]+)/(?P<show>\w+)' _VALID_URL = r'https?://(?P<station>fm4)\.orf\.at/player/(?P<date>[0-9]+)/(?P<show>\w+)'
_TEST = { _TEST = {
'url': 'http://fm4.orf.at/player/20170107/CC', 'url': 'https://fm4.orf.at/player/20200101/4HOP',
'md5': '2b0be47375432a7ef104453432a19212', 'md5': '643bcd94f1f08128b53656b18a6a1f14',
'info_dict': { 'info_dict': {
'id': '2017-01-07_2100_tl_54_7DaysSat18_31295', 'id': '2020-01-01_2156_tl_54_7DaysWed16_90867',
'ext': 'mp3', 'ext': 'mp3',
'title': 'Solid Steel Radioshow', 'title': 'House Of Pain',
'description': 'Die Mixshow von Coldcut und Ninja Tune.', 'description': '<p>Der mittwöchige Streifzug durch die Welt der schweren Riffs und grollenden Bässe, metallischen Sounds und düsteren Elektronik. Mit Christian Fuchs und seiner Gang.</p>',
'duration': 3599, 'duration': 7288.0,
'timestamp': 1483819257, 'timestamp': 1577912190.0,
'upload_date': '20170107', 'upload_date': '20200101',
}, },
'skip': 'Shows from ORF radios are only available for 7 days.' 'skip': 'Shows from ORF radios are only available for 7 days.'
} }
@ -219,15 +216,16 @@ class ORFOE1IE(ORFRadioIE):
_VALID_URL = r'https?://(?P<station>oe1)\.orf\.at/player/(?P<date>[0-9]+)/(?P<show>\w+)' _VALID_URL = r'https?://(?P<station>oe1)\.orf\.at/player/(?P<date>[0-9]+)/(?P<show>\w+)'
_TEST = { _TEST = {
'url': 'http://oe1.orf.at/player/20170108/456544', 'url': 'https://oe1.orf.at/player/20191231/583045',
'md5': '34d8a6e67ea888293741c86a099b745b', 'md5': '3c37eb61909609c9e7069957c2ba453d',
'info_dict': { 'info_dict': {
'id': '2017-01-08_0759_tl_51_7DaysSun6_256141', 'id': '2019-12-31_0659_tl_51_7DaysTue6_1159893',
'ext': 'mp3', 'ext': 'mp3',
'title': 'Morgenjournal', 'title': 'Ö1 Morgenjournal',
'duration': 609, 'description': '<p>mit Kultur aktuell</p>',
'timestamp': 1483858796, 'duration': 1992.0,
'upload_date': '20170108', 'timestamp': 1577771996.0,
'upload_date': '20191231',
}, },
'skip': 'Shows from ORF radios are only available for 7 days.' 'skip': 'Shows from ORF radios are only available for 7 days.'
} }