mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-09-10 00:58:17 +02:00
[ted] simplify
This commit is contained in:
parent
d24ffe1cfa
commit
463a908705
@ -95,7 +95,7 @@ def _talk_info(self, url, video_id=0):
|
||||
self._list_available_subtitles(video_id, webpage)
|
||||
return
|
||||
|
||||
info = {
|
||||
return {
|
||||
'id': video_id,
|
||||
'title': title,
|
||||
'thumbnail': thumbnail,
|
||||
@ -104,11 +104,6 @@ def _talk_info(self, url, video_id=0):
|
||||
'formats': formats,
|
||||
}
|
||||
|
||||
# TODO: Remove when #980 has been merged
|
||||
info.update(info['formats'][-1])
|
||||
|
||||
return info
|
||||
|
||||
def _get_available_subtitles(self, video_id, webpage):
|
||||
try:
|
||||
options = self._search_regex(r'(?:<select name="subtitles_language_select" id="subtitles_language_select">)(.*?)(?:</select>)', webpage, 'subtitles_language_select', flags=re.DOTALL)
|
||||
|
Loading…
Reference in New Issue
Block a user