源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

使用Python实现下载网易云音乐的高清MV

  • 时间:2021-10-18 21:30 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:使用Python实现下载网易云音乐的高清MV
Python下载网易云音乐的高清MV,没有从首页进去解析,直接循环了.... downPage1.py
[url=http://music.163.com/mv?id=%s"%num]http://music.163.com/mv?id=%s"%num[/url])     parsed = getVideo(html)     if  len(parsed)==0:         continue     vedioUrls = parsed[0].split("&")     artist = vedioUrls[4].split("=")[1].decode('utf-8').strip()     song = vedioUrls[3].split("=")[1].decode('utf-8').strip()     if  len(vedioUrls[0])==0:         continue     filename = '%s/%s.mp4' %(artist,song)     if "/" in song:         continue     if os.path.exists(filename):         print 'the MV file exists.%s'%num     else:         print 'the MV is downloding.%s'%num         if  os.path.exists(artist):             print ""         else:             os.makedirs(artist)         urllib.urlretrieve(vedioUrls[0],filename)
以上就是本文分享的全部代码了,希望大家能够喜欢。
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部