1 from .common
import InfoExtractor
2 from ..utils
import url_or_none
3 from ..utils
.traversal
import traverse_obj
6 class RadioRadicaleIE(InfoExtractor
):
7 _VALID_URL
= r
'https?://(?:www\.)?radioradicale\.it/scheda/(?P<id>[0-9]+)'
9 'url': 'https://www.radioradicale.it/scheda/471591',
10 'md5': 'eb0fbe43a601f1a361cbd00f3c45af4a',
14 'title': 'md5:e8fbb8de57011a3255db0beca69af73d',
15 'description': 'md5:5e15a789a2fe4d67da8d1366996e89ef',
18 'timestamp': 1459987200,
19 'upload_date': '20160407',
20 'thumbnail': 'https://www.radioradicale.it/photo400/0/0/9/0/1/00901768.jpg',
23 'url': 'https://www.radioradicale.it/scheda/742783/parlamento-riunito-in-seduta-comune-11a-della-xix-legislatura',
26 'title': 'Parlamento riunito in seduta comune (11ª della XIX legislatura)',
27 'description': '-) Votazione per l\'elezione di un giudice della Corte Costituzionale (nono scrutinio)',
30 'timestamp': 1730246400,
31 'upload_date': '20241030',
34 'md5': 'aa48de55dcc45478e4cd200f299aab7d',
38 'title': 'Parlamento riunito in seduta comune (11ª della XIX legislatura)',
41 'md5': 'be915c189c70ad2920e5810f32260ff5',
45 'title': 'Parlamento riunito in seduta comune (11ª della XIX legislatura)',
48 'md5': 'f0ee4047342baf8ed3128a8417ac5e0a',
52 'title': 'Parlamento riunito in seduta comune (11ª della XIX legislatura)',
57 def _entries(self
, videos_info
, page_id
):
58 for idx
, video
in enumerate(traverse_obj(
59 videos_info
, ('playlist', lambda _
, v
: v
['sources']))):
60 video_id
= f
'{page_id}-{idx}'
64 for m3u8_url
in traverse_obj(video
, ('sources', ..., 'src', {url_or_none}
)):
65 fmts
, subs
= self
._extract
_m
3u8_formats
_and
_subtitles
(m3u8_url
, video_id
)
67 self
._merge
_subtitles
(subs
, target
=subtitles
)
68 for sub
in traverse_obj(video
, ('subtitles', ..., lambda _
, v
: url_or_none(v
['src']))):
69 self
._merge
_subtitles
({sub
.get('srclang') or 'und': [{
71 'name': sub
.get('label'),
72 }]}, target
=subtitles
)
76 'title': video
.get('title'),
78 'subtitles': subtitles
,
81 def _real_extract(self
, url
):
82 page_id
= self
._match
_id
(url
)
83 webpage
= self
._download
_webpage
(url
, page_id
)
85 videos_info
= self
._search
_json
(
86 r
'jQuery\.extend\(Drupal\.settings\s*,',
87 webpage
, 'videos_info', page_id
)['RRscheda']
89 entries
= list(self
._entries
(videos_info
, page_id
))
93 'title': self
._og
_search
_title
(webpage
),
94 'description': self
._og
_search
_description
(webpage
),
95 'location': videos_info
.get('luogo'),
96 **self
._search
_json
_ld
(webpage
, page_id
),
105 return self
.playlist_result(entries
, multi_video
=True, **common_info
)