1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-07-01 09:50:05 +02:00

extract_formats() => _extract_formats()

Authored by: bashonly
This commit is contained in:
bashonly 2024-06-25 18:31:07 -05:00
parent ddf6ed2851
commit a0cf17f9c6
No known key found for this signature in database
GPG Key ID: 783F096F253D15B0

View File

@ -71,7 +71,7 @@ def _call_player_api(self, song_id, level):
'/song/enhance/player/url/v1', song_id, {'ids': f'[{song_id}]', 'level': level, 'encodeType': 'flac'},
note=f'Downloading song URL info: level {level}')
def extract_formats(self, info):
def _extract_formats(self, info):
formats = []
song_id = info['id']
for level in self._LEVELS:
@ -251,7 +251,7 @@ def _real_extract(self, url):
info = self.query_api(
f'song/detail?id={song_id}&ids=%5B{song_id}%5D', song_id, 'Downloading song info')['songs'][0]
formats = self.extract_formats(info)
formats = self._extract_formats(info)
lyrics = self._process_lyrics(self.query_api(
f'song/lyric?id={song_id}&lv=-1&tv=-1', song_id, 'Downloading lyrics data'))
@ -560,7 +560,7 @@ def _real_extract(self, url):
if not self._yes_playlist(
info['songs'] and program_id, info['mainSong']['id'], playlist_label='program', video_label='song'):
formats = self.extract_formats(info['mainSong'])
formats = self._extract_formats(info['mainSong'])
return {
'id': str(info['mainSong']['id']),