mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-23 10:37:18 -05:00
[generic] Refactor
This commit is contained in:
parent
6cc37c69e2
commit
28602e747c
@ -1886,25 +1886,22 @@ class GenericIE(InfoExtractor):
|
|||||||
# here's a fun little line of code for you:
|
# here's a fun little line of code for you:
|
||||||
video_id = os.path.splitext(video_id)[0]
|
video_id = os.path.splitext(video_id)[0]
|
||||||
|
|
||||||
|
entry_info_dict = {
|
||||||
|
'id': video_id,
|
||||||
|
'uploader': video_uploader,
|
||||||
|
'title': video_title,
|
||||||
|
'age_limit': age_limit,
|
||||||
|
}
|
||||||
|
|
||||||
ext = determine_ext(video_url)
|
ext = determine_ext(video_url)
|
||||||
if ext == 'smil':
|
if ext == 'smil':
|
||||||
entries.append({
|
entry_info_dict['formats'] = self._extract_smil_formats(video_url, video_id)
|
||||||
'id': video_id,
|
|
||||||
'formats': self._extract_smil_formats(video_url, video_id),
|
|
||||||
'uploader': video_uploader,
|
|
||||||
'title': video_title,
|
|
||||||
'age_limit': age_limit,
|
|
||||||
})
|
|
||||||
elif ext == 'xspf':
|
elif ext == 'xspf':
|
||||||
return self.playlist_result(self._extract_xspf_playlist(video_url, video_id), video_id)
|
return self.playlist_result(self._extract_xspf_playlist(video_url, video_id), video_id)
|
||||||
else:
|
else:
|
||||||
entries.append({
|
entry_info_dict['url'] = video_url
|
||||||
'id': video_id,
|
|
||||||
'url': video_url,
|
entries.append(entry_info_dict)
|
||||||
'uploader': video_uploader,
|
|
||||||
'title': video_title,
|
|
||||||
'age_limit': age_limit,
|
|
||||||
})
|
|
||||||
|
|
||||||
if len(entries) == 1:
|
if len(entries) == 1:
|
||||||
return entries[0]
|
return entries[0]
|
||||||
|
Loading…
Reference in New Issue
Block a user