Improved quality for programs

This commit is contained in:
iceBear67 2022-07-12 13:18:18 +08:00
parent 5e7aea3fab
commit f7b2b251be
No known key found for this signature in database
GPG Key ID: DBFD4E7100B6EA59
1 changed files with 2 additions and 10 deletions

View File

@ -69,21 +69,13 @@ class CloudApi(object):
def get_program_url(self, program, encode_type="aac", level="standard"): def get_program_url(self, program, encode_type="aac", level="standard"):
""" """
Get the download url of the program Get the download url of the program
:param program: :param program
:param encode_type: :param encode_type:
:param level: :param level:
:return: :return:
""" """
id = program['mainSong']['id'] id = program['mainSong']['id']
url = program_download_url return self.get_song_url(id)
payload = {
'ids': [id],
'csrf_token': '',
'encodeType': encode_type,
'level': level
}
result = self.post_request(url, payload)
return result['data'][0]['url']
def get_album_songs(self, album_id): def get_album_songs(self, album_id):
""" """