1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-11-22 16:44:32 +01:00

[orf] Add Radiothek extractor

This commit is contained in:
Benedikt Gollatz 2020-05-13 16:36:08 +02:00
parent 9d8f3a12a6
commit a408f0b452
2 changed files with 33 additions and 0 deletions

View File

@ -814,6 +814,7 @@ from .orf import (
ORFSBGIE, ORFSBGIE,
ORFTIRIE, ORFTIRIE,
ORFVBGIE, ORFVBGIE,
ORFRadiothekIE,
ORFIPTVIE, ORFIPTVIE,
) )
from .outsidetv import OutsideTVIE from .outsidetv import OutsideTVIE

View File

@ -376,6 +376,38 @@ class ORFOE1IE(ORFRadioIE):
} }
class ORFRadiothekIE(ORFRadioIE):
_VALID_URL = r'https?://radiothek\.orf\.at/(?P<station>\w+)/(?P<date>[0-9]+)/(?P<show>\w+)'
IE_NAME = 'orf:radiothek'
IE_DESC = 'ORF Radiothek'
_API_LOOP_MAP = {
'fm4': 'fm4',
'noe': 'oe2n',
'wie': 'oe2w',
'bgl': 'oe2b',
'ooe': 'oe2o',
'stm': 'oe2st',
'ktn': 'oe2k',
'sbg': 'oe2s',
'tir': 'oe2t',
'vbg': 'oe2v',
'oe3': 'oe3',
'oe1': 'oe1',
}
_TEST = {
'url': 'https://radiothek.orf.at/fm4/20200513/4UL',
'only_matching': True,
}
def _real_extract(self, url):
mobj = re.match(self._VALID_URL, url)
self._API_STATION = mobj.group('station')
self._LOOP_STATION = self._API_LOOP_MAP[mobj.group('station')]
return super(ORFRadiothekIE, self)._real_extract(url)
class ORFIPTVIE(InfoExtractor): class ORFIPTVIE(InfoExtractor):
IE_NAME = 'orf:iptv' IE_NAME = 'orf:iptv'
IE_DESC = 'iptv.ORF.at' IE_DESC = 'iptv.ORF.at'