#!/usr/bin/python3
#-*-Encoding:utf-8-*-
#NetEase Cloud Music Batch Download
Import requests
Import Urllib
#List songs Batch Download
# r = Requests.get (' http://music.163.com/api/playlist/detail?id=2884035 ') #NetEase Original Song list
# r = Requests.get (' http://music.163.com/api/playlist/detail?id=19723756 ') #Cloud Music Soaring List
# r = Requests.get (' http://music.163.com/api/playlist/detail?id=3778678 ') #Cloud Music Hot Song list
R = Requests.get (' http://music.163.com/api/playlist/detail?id=3779629 ')#Cloud Music new song list
#Song single song Batch Download
# r = Requests.get (' http://music.163.com/api/playlist/detail?id=123415635 ') #Cloud Music Song list——"Chinese" China's rhythm of the Wind, the Chinese mark
# r = Requests.get (' http://music.163.com/api/playlist/detail?id=122732380 ') #Cloud Music Song list——It's not love, it's just a lie of loneliness.
arr = R.json () [' Result ' [' Tracks ']#Total100Song
For IInchRange10):#Enter the number of music to download,1To100。
Name =STR (i+1) +"+ arr[i][' Name '] +'. mp3 '
link = arr[i][' Mp3url ')
Urllib.request.urlretrieve (link, ' netease cloud music \ \' + name) # advance to create a folder
Print (name + ' download complete ')
Python3 crawler: Download NetEase Cloud Music Rankings