From bcc6d8530c223db531002cc9123ae27ddebe6c3a Mon Sep 17 00:00:00 2001 From: Johannes Date: Thu, 2 Jan 2020 10:30:38 +0100 Subject: [PATCH 1/3] 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. --- youtube_dl/extractor/orf.py | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/youtube_dl/extractor/orf.py b/youtube_dl/extractor/orf.py index 3425f7602..3b2d936f8 100644 --- a/youtube_dl/extractor/orf.py +++ b/youtube_dl/extractor/orf.py @@ -161,9 +161,6 @@ class ORFRadioIE(InfoExtractor): show_date = mobj.group('date') show_id = mobj.group('show') - if station == 'fm4': - show_id = '4%s' % show_id - data = self._download_json( 'http://audioapi.orf.at/%s/api/json/current/broadcast/%s/%s' % (station, show_id, show_date), show_id @@ -198,16 +195,16 @@ class ORFFM4IE(ORFRadioIE): _VALID_URL = r'https?://(?Pfm4)\.orf\.at/player/(?P[0-9]+)/(?P\w+)' _TEST = { - 'url': 'http://fm4.orf.at/player/20170107/CC', - 'md5': '2b0be47375432a7ef104453432a19212', + 'url': 'https://fm4.orf.at/player/20200101/4HOP', + 'md5': '643bcd94f1f08128b53656b18a6a1f14', 'info_dict': { - 'id': '2017-01-07_2100_tl_54_7DaysSat18_31295', + 'id': '2020-01-01_2156_tl_54_7DaysWed16_90867', 'ext': 'mp3', - 'title': 'Solid Steel Radioshow', - 'description': 'Die Mixshow von Coldcut und Ninja Tune.', - 'duration': 3599, - 'timestamp': 1483819257, - 'upload_date': '20170107', + 'title': 'House Of Pain', + 'description': '

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.

', + 'duration': 7288.0, + 'timestamp': 1577912190.0, + 'upload_date': '20200101', }, 'skip': 'Shows from ORF radios are only available for 7 days.' } @@ -219,15 +216,16 @@ class ORFOE1IE(ORFRadioIE): _VALID_URL = r'https?://(?Poe1)\.orf\.at/player/(?P[0-9]+)/(?P\w+)' _TEST = { - 'url': 'http://oe1.orf.at/player/20170108/456544', - 'md5': '34d8a6e67ea888293741c86a099b745b', + 'url': 'https://oe1.orf.at/player/20191231/583045', + 'md5': '3c37eb61909609c9e7069957c2ba453d', 'info_dict': { - 'id': '2017-01-08_0759_tl_51_7DaysSun6_256141', + 'id': '2019-12-31_0659_tl_51_7DaysTue6_1159893', 'ext': 'mp3', - 'title': 'Morgenjournal', - 'duration': 609, - 'timestamp': 1483858796, - 'upload_date': '20170108', + 'title': 'Ö1 Morgenjournal', + 'description': '

mit Kultur aktuell

', + 'duration': 1992.0, + 'timestamp': 1577771996.0, + 'upload_date': '20191231', }, 'skip': 'Shows from ORF radios are only available for 7 days.' } From 2ce63b2e7ca2dbc5e0ef356e0259793dbfa6c43e Mon Sep 17 00:00:00 2001 From: Johannes Date: Sun, 5 Jan 2020 11:35:33 +0100 Subject: [PATCH 2/3] updated ORFFM4IE _VALID_URL to match only urls where show_id is starting with "4" --- youtube_dl/extractor/orf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/extractor/orf.py b/youtube_dl/extractor/orf.py index 3b2d936f8..c85843cab 100644 --- a/youtube_dl/extractor/orf.py +++ b/youtube_dl/extractor/orf.py @@ -192,7 +192,7 @@ class ORFRadioIE(InfoExtractor): class ORFFM4IE(ORFRadioIE): IE_NAME = 'orf:fm4' IE_DESC = 'radio FM4' - _VALID_URL = r'https?://(?Pfm4)\.orf\.at/player/(?P[0-9]+)/(?P\w+)' + _VALID_URL = r'https?://(?Pfm4)\.orf\.at/player/(?P[0-9]+)/(?P4\w+)' _TEST = { 'url': 'https://fm4.orf.at/player/20200101/4HOP', From 6afb1b03df0d84dea2630f943a0d73d94019160f Mon Sep 17 00:00:00 2001 From: Sergey M Date: Sat, 11 Jan 2020 01:49:04 +0700 Subject: [PATCH 3/3] Update orf.py --- youtube_dl/extractor/orf.py | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/youtube_dl/extractor/orf.py b/youtube_dl/extractor/orf.py index c85843cab..816bd212e 100644 --- a/youtube_dl/extractor/orf.py +++ b/youtube_dl/extractor/orf.py @@ -195,16 +195,16 @@ class ORFFM4IE(ORFRadioIE): _VALID_URL = r'https?://(?Pfm4)\.orf\.at/player/(?P[0-9]+)/(?P4\w+)' _TEST = { - 'url': 'https://fm4.orf.at/player/20200101/4HOP', - 'md5': '643bcd94f1f08128b53656b18a6a1f14', + 'url': 'http://fm4.orf.at/player/20170107/4CC', + 'md5': '2b0be47375432a7ef104453432a19212', 'info_dict': { - 'id': '2020-01-01_2156_tl_54_7DaysWed16_90867', + 'id': '2017-01-07_2100_tl_54_7DaysSat18_31295', 'ext': 'mp3', - 'title': 'House Of Pain', - 'description': '

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.

', - 'duration': 7288.0, - 'timestamp': 1577912190.0, - 'upload_date': '20200101', + 'title': 'Solid Steel Radioshow', + 'description': 'Die Mixshow von Coldcut und Ninja Tune.', + 'duration': 3599, + 'timestamp': 1483819257, + 'upload_date': '20170107', }, 'skip': 'Shows from ORF radios are only available for 7 days.' } @@ -216,16 +216,15 @@ class ORFOE1IE(ORFRadioIE): _VALID_URL = r'https?://(?Poe1)\.orf\.at/player/(?P[0-9]+)/(?P\w+)' _TEST = { - 'url': 'https://oe1.orf.at/player/20191231/583045', - 'md5': '3c37eb61909609c9e7069957c2ba453d', + 'url': 'http://oe1.orf.at/player/20170108/456544', + 'md5': '34d8a6e67ea888293741c86a099b745b', 'info_dict': { - 'id': '2019-12-31_0659_tl_51_7DaysTue6_1159893', + 'id': '2017-01-08_0759_tl_51_7DaysSun6_256141', 'ext': 'mp3', - 'title': 'Ö1 Morgenjournal', - 'description': '

mit Kultur aktuell

', - 'duration': 1992.0, - 'timestamp': 1577771996.0, - 'upload_date': '20191231', + 'title': 'Morgenjournal', + 'duration': 609, + 'timestamp': 1483858796, + 'upload_date': '20170108', }, 'skip': 'Shows from ORF radios are only available for 7 days.' }