mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-03 08:19:57 +01:00
[kwuo] Remove _sort_formats() from KuwoBaseIE._get_formats()
Following the idea proposed in 19dbaeece3
This commit is contained in:
parent
597d52fadb
commit
3ae6f8fec1
@ -44,11 +44,6 @@ def _get_formats(self, song_id, tolerate_ip_deny=False):
|
||||
'abr': file_format.get('abr'),
|
||||
})
|
||||
|
||||
# XXX _sort_formats fails if there are not formats, while it's not the
|
||||
# desired behavior if 'IPDeny' is ignored
|
||||
# This check can be removed if https://github.com/rg3/youtube-dl/pull/8051 is merged
|
||||
if not tolerate_ip_deny:
|
||||
self._sort_formats(formats)
|
||||
return formats
|
||||
|
||||
|
||||
@ -103,6 +98,7 @@ def _real_extract(self, url):
|
||||
lrc_content = None
|
||||
|
||||
formats = self._get_formats(song_id)
|
||||
self._sort_formats(formats)
|
||||
|
||||
album_id = self._html_search_regex(
|
||||
r'<p[^>]+class="album"[^<]+<a[^>]+href="http://www\.kuwo\.cn/album/(\d+)/"',
|
||||
|
Loading…
Reference in New Issue
Block a user