This commit is contained in:
@ -6,7 +6,7 @@ def getPlaylist(token):
|
||||
headers = {
|
||||
'x-nd-authorization': f'Bearer {token}'
|
||||
}
|
||||
res = requests.get(f'{host}/api/playlist?_end=50&_order=ASC&_sort=id&_start=0', headers = headers)
|
||||
res = requests.get(f'{host}/music/api/playlist?_end=50&_order=ASC&_sort=id&_start=0', headers = headers)
|
||||
resJson = res.json()
|
||||
return resJson
|
||||
|
||||
@ -15,13 +15,13 @@ def downloadPlayList(palyListId, token):
|
||||
'Accept': 'audio/x-mpegurl',
|
||||
'x-nd-authorization': f'Bearer {token}'
|
||||
}
|
||||
res = requests.get(f'{host}/api/playlist/{palyListId}/tracks', headers = headers)
|
||||
res = requests.get(f'{host}/music/api/playlist/{palyListId}/tracks', headers = headers)
|
||||
return res.content
|
||||
|
||||
def delPlaylist(playlistId, token):
|
||||
headers = {
|
||||
'x-nd-authorization': f'Bearer {token}'
|
||||
}
|
||||
res = requests.delete(f'{host}/api/playlist/{playlistId}', headers = headers)
|
||||
res = requests.delete(f'{host}/music/api/playlist/{playlistId}', headers = headers)
|
||||
resJson = res.json()
|
||||
return resJson
|
@ -2,6 +2,6 @@ import requests
|
||||
|
||||
def getToken():
|
||||
body = { 'username': 'mol', 'password': 'c!UxnePTkwBMb7' }
|
||||
res = requests.post('https://music.hiiragi.club:8081/auth/login', json = body)
|
||||
res = requests.post('http://192.168.124.12:4533/music/auth/login', json = body)
|
||||
resJson = res.json()
|
||||
return resJson.get('token')
|
Reference in New Issue
Block a user