2019-12-06
Python3 下载 QQ 音乐收费、高品质无损音乐源码 #!/usr/bin/env python ## -*- coding: utf-8 -*- import requests import json headers = { 'Host': 'c.y.qq.com', 'Referer': 'http://c.y.qq.com/', 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 ' 'Safari/537.36 ' } def douqq_post(mid): """ 返回歌曲下载url :param mid:歌曲mid :return: 字典 """ post_url = 'http://www.douqq.com/qqmusic/qqapi.php' data = {'mid': mid} res = requests.post(post_url, data=data) get_json = json.loads(res.text) return eval(get_json) def download_file(src, file_path): """ 歌曲下