1 from .common
import InfoExtractor
4 class RTRFMIE(InfoExtractor
):
5 _VALID_URL
= r
'https?://(?:www\.)?rtrfm\.com\.au/(?:shows|show-episode)/(?P<id>[^/?\#&]+)'
8 'url': 'https://rtrfm.com.au/shows/breakfast/',
9 'md5': '46168394d3a5ce237cf47e85d0745413',
11 'id': 'breakfast-2021-11-16',
13 'series': 'Breakfast with Taylah',
14 'title': r
're:^Breakfast with Taylah \d{4}-\d{2}-\d{2}$',
15 'description': 'md5:0979c3ab1febfbec3f1ccb743633c611',
17 'skip': 'ID and md5 changes daily',
20 'url': 'https://rtrfm.com.au/show-episode/breakfast-2021-11-11/',
21 'md5': '396bedf1e40f96c62b30d4999202a790',
23 'id': 'breakfast-2021-11-11',
25 'series': 'Breakfast with Taylah',
26 'title': 'Breakfast with Taylah 2021-11-11',
27 'description': 'md5:0979c3ab1febfbec3f1ccb743633c611',
31 'url': 'https://rtrfm.com.au/show-episode/breakfast-2020-06-01/',
32 'md5': '594027f513ec36a24b15d65007a24dff',
34 'id': 'breakfast-2020-06-01',
36 'series': 'Breakfast with Taylah',
37 'title': 'Breakfast with Taylah 2020-06-01',
38 'description': r
're:^Breakfast with Taylah ',
40 'skip': 'This audio has expired',
44 def _real_extract(self
, url
):
45 display_id
= self
._match
_id
(url
)
46 webpage
= self
._download
_webpage
(url
, display_id
)
47 show
, date
, title
= self
._search
_regex
(
48 r
'''\.playShow(?:From)?\(['"](?P<show>[^'"]+)['"],\s*['"](?P<date>[0-9]{4}-[0-9]{2}-[0-9]{2})['"],\s*['"](?P<title>[^'"]+)['"]''',
49 webpage
, 'details', group
=('show', 'date', 'title'))
50 url
= self
._download
_json
(
51 'https://restreams.rtrfm.com.au/rzz',
52 show
, 'Downloading MP3 URL', query
={'n': show
, 'd': date
})['u']
53 # This is the only indicator of an error until trying to download the URL and
54 # downloads of mp4 URLs always fail (403 for current episodes, 404 for missing).
57 self
.raise_no_formats('Expired or no episode on this date', expected
=True)
59 'id': f
'{show}-{date}',
60 'title': f
'{title} {date}',
64 'description': self
._og
_search
_description
(webpage
),