資源簡介
支持python3以上,有中文注釋,選擇自己想要爬取的歌單,輸入id即可
代碼片段和文件信息
#-*_coding:utf8-*-
#?網易云音樂批量下載
#?Python3.5.1
import?requests
import?urllib
r?=?requests.get(‘http://music.163.com/api/playlist/detail?id=2153717858‘)#?id后面的數字為你需要爬取的歌單id,網頁版云音樂網頁鏈接可看到
arr?=?r.json()[‘result‘][‘tracks‘] #?共有100首歌
def?Schedule(abc):
‘‘‘
a:已經下載的數據塊
b:數據塊的大小
c:遠程文件的大小
‘‘‘
per?=?100.0?*?a
評論
共有 條評論