diff --git a/youtube_dl/extractor/orf.py b/youtube_dl/extractor/orf.py index 71da432c9..700ce448c 100644 --- a/youtube_dl/extractor/orf.py +++ b/youtube_dl/extractor/orf.py @@ -167,7 +167,7 @@ class ORFRadioIE(InfoExtractor): data = self._download_json( 'http://audioapi.orf.at/%s/api/json/current/broadcast/%s/%s' - % (self.api_station, show_id, show_date), show_id) + % (self._API_STATION, show_id, show_date), show_id) entries = [] for info in data['streams']: @@ -182,7 +182,7 @@ class ORFRadioIE(InfoExtractor): duration = end - start if end and start else None entries.append({ 'id': loop_stream_id.replace('.mp3', ''), - 'url': 'http://loopstream01.apa.at/?channel=%s&id=%s' % (self.loop_station, loop_stream_id), + 'url': 'http://loopstream01.apa.at/?channel=%s&id=%s' % (self._LOOP_STATION, loop_stream_id), 'title': title, 'description': clean_html(data.get('subtitle')), 'duration': duration, @@ -204,8 +204,8 @@ class ORFFM4IE(ORFRadioIE): IE_NAME = 'orf:fm4' IE_DESC = 'radio FM4' _VALID_URL = r'https?://(?Pfm4)\.orf\.at/player/(?P[0-9]+)/(?P4\w+)' - api_station = "fm4" - loop_station = "fm4" + _API_STATION = 'fm4' + _LOOP_STATION = 'fm4' _TEST = { 'url': 'http://fm4.orf.at/player/20170107/4CC', @@ -228,8 +228,8 @@ class ORFNOEIE(ORFRadioIE): IE_NAME = 'orf:noe' IE_DESC = 'Radio Niederösterreich' _VALID_URL = r'https?://(?Pnoe)\.orf\.at/player/(?P[0-9]+)/(?P\w+)' - api_station = "noe" - loop_station = "oe2n" + _API_STATION = 'noe' + _LOOP_STATION = 'oe2n' _TEST = { 'url': 'https://noe.orf.at/player/20200423/NGM', @@ -241,8 +241,8 @@ class ORFWIEIE(ORFRadioIE): IE_NAME = 'orf:wien' IE_DESC = 'Radio Wien' _VALID_URL = r'https?://(?Pwien)\.orf\.at/player/(?P[0-9]+)/(?P\w+)' - api_station = "wie" - loop_station = "oe2w" + _API_STATION = 'wie' + _LOOP_STATION = 'oe2w' _TEST = { 'url': 'https://wien.orf.at/player/20200423/WGUM', @@ -254,8 +254,8 @@ class ORFBGLIE(ORFRadioIE): IE_NAME = 'orf:burgenland' IE_DESC = 'Radio Burgenland' _VALID_URL = r'https?://(?Pburgenland)\.orf\.at/player/(?P[0-9]+)/(?P\w+)' - api_station = "bgl" - loop_station = "oe2b" + _API_STATION = 'bgl' + _LOOP_STATION = 'oe2b' _TEST = { 'url': 'https://burgenland.orf.at/player/20200423/BGM', @@ -267,8 +267,8 @@ class ORFOOEIE(ORFRadioIE): IE_NAME = 'orf:oberoesterreich' IE_DESC = 'Radio Oberösterreich' _VALID_URL = r'https?://(?Pooe)\.orf\.at/player/(?P[0-9]+)/(?P\w+)' - api_station = "ooe" - loop_station = "oe2o" + _API_STATION = 'ooe' + _LOOP_STATION = 'oe2o' _TEST = { 'url': 'https://ooe.orf.at/player/20200423/OGMO', @@ -280,8 +280,8 @@ class ORFSTMIE(ORFRadioIE): IE_NAME = 'orf:steiermark' IE_DESC = 'Radio Steiermark' _VALID_URL = r'https?://(?Psteiermark)\.orf\.at/player/(?P[0-9]+)/(?P\w+)' - api_station = "stm" - loop_station = "oe2st" + _API_STATION = 'stm' + _LOOP_STATION = 'oe2st' _TEST = { 'url': 'https://steiermark.orf.at/player/20200423/STGMS', @@ -293,8 +293,8 @@ class ORFKTNIE(ORFRadioIE): IE_NAME = 'orf:kaernten' IE_DESC = 'Radio Kärnten' _VALID_URL = r'https?://(?Pkaernten)\.orf\.at/player/(?P[0-9]+)/(?P\w+)' - api_station = "ktn" - loop_station = "oe2k" + _API_STATION = 'ktn' + _LOOP_STATION = 'oe2k' _TEST = { 'url': 'https://kaernten.orf.at/player/20200423/KGUMO', @@ -306,8 +306,8 @@ class ORFSBGIE(ORFRadioIE): IE_NAME = 'orf:salzburg' IE_DESC = 'Radio Salzburg' _VALID_URL = r'https?://(?Psalzburg)\.orf\.at/player/(?P[0-9]+)/(?P\w+)' - api_station = "sbg" - loop_station = "oe2s" + _API_STATION = 'sbg' + _LOOP_STATION = 'oe2s' _TEST = { 'url': 'https://salzburg.orf.at/player/20200423/SGUM', @@ -319,8 +319,8 @@ class ORFTIRIE(ORFRadioIE): IE_NAME = 'orf:tirol' IE_DESC = 'Radio Tirol' _VALID_URL = r'https?://(?Ptirol)\.orf\.at/player/(?P[0-9]+)/(?P\w+)' - api_station = "tir" - loop_station = "oe2t" + _API_STATION = 'tir' + _LOOP_STATION = 'oe2t' _TEST = { 'url': 'https://tirol.orf.at/player/20200423/TGUMO', @@ -332,8 +332,8 @@ class ORFVBGIE(ORFRadioIE): IE_NAME = 'orf:vorarlberg' IE_DESC = 'Radio Vorarlberg' _VALID_URL = r'https?://(?Pvorarlberg)\.orf\.at/player/(?P[0-9]+)/(?P\w+)' - api_station = "vbg" - loop_station = "oe2v" + _API_STATION = 'vbg' + _LOOP_STATION = 'oe2v' _TEST = { 'url': 'https://vorarlberg.orf.at/player/20200423/VGUM', @@ -345,8 +345,8 @@ class ORFOE3IE(ORFRadioIE): IE_NAME = 'orf:oe3' IE_DESC = 'Radio Österreich 3' _VALID_URL = r'https?://(?Poe3)\.orf\.at/player/(?P[0-9]+)/(?P\w+)' - api_station = "oe3" - loop_station = "oe3" + _API_STATION = 'oe3' + _LOOP_STATION = 'oe3' _TEST = { 'url': 'https://oe3.orf.at/player/20200424/3WEK', @@ -358,8 +358,8 @@ class ORFOE1IE(ORFRadioIE): IE_NAME = 'orf:oe1' IE_DESC = 'Radio Österreich 1' _VALID_URL = r'https?://(?Poe1)\.orf\.at/player/(?P[0-9]+)/(?P\w+)' - api_station = "oe1" - loop_station = "oe1" + _API_STATION = 'oe1' + _LOOP_STATION = 'oe1' _TEST = { 'url': 'http://oe1.orf.at/player/20170108/456544',