1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-06-28 01:18:30 +00:00

style: hatch fmt

This commit is contained in:
DarkCat09 2025-03-22 14:19:26 +04:00
parent 6f0c64b148
commit 0d9e92a456
No known key found for this signature in database

View File

@ -774,8 +774,8 @@ class VKMusicIE(VKBaseIE):
}, },
'params': { 'params': {
'skip_download': True, 'skip_download': True,
} },
} },
] ]
def _real_extract(self, url): def _real_extract(self, url):
@ -798,7 +798,7 @@ def _real_extract(self, url):
meta = self._download_payload('al_audio', track_id, { meta = self._download_payload('al_audio', track_id, {
'act': 'reload_audios', 'act': 'reload_audios',
'audio_ids': f'{track_id}_{one_more_id}' 'audio_ids': f'{track_id}_{one_more_id}',
})[0][0] })[0][0]
url = _unmask_url(meta[2], self._parse_vk_id()) url = _unmask_url(meta[2], self._parse_vk_id())
@ -1025,6 +1025,7 @@ def _real_extract(self, url):
_BASE64_CHARS = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMN0PQRSTUVWXYZO123456789+/=' _BASE64_CHARS = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMN0PQRSTUVWXYZO123456789+/='
def _b64_decode(enc): def _b64_decode(enc):
dec = '' dec = ''
e = n = 0 e = n = 0
@ -1037,6 +1038,7 @@ def _b64_decode(enc):
dec += chr(255 & e >> (-2 * n & 6)) dec += chr(255 & e >> (-2 * n & 6))
return dec return dec
def _unmask_url(mask_url, vk_id): def _unmask_url(mask_url, vk_id):
if 'audio_api_unavailable' in mask_url: if 'audio_api_unavailable' in mask_url:
extra = mask_url.split('?extra=')[1].split('#') extra = mask_url.split('?extra=')[1].split('#')