Home
Categories
WIKI
Topic
User
LANGUAGE:
中文
English
QQ音乐 接口共享,仅供学习
deepin Talks
935
views ·
2
replies ·
To
floor
Go
heisen
deepin
2019-09-22 23:48
Author
费劲巴力爬到了QQ音乐的web接口,可通过搜索 获取到真实链接
但发现没时间写了,还是把写了一半的接口共享出来供大家一起学习用吧,
校学生一枚,大神勿喷 , 喷子绕行 谢谢!!!
侵删,谢谢:
ybaojun@hotmail.com
import requests
import json
headers = {'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36'}
#### 搜索歌曲内容, songurl 中的:“p=1”参数是翻页功能 ,当值为1时是第一页
def search():
songurl = 'https://c.y.qq.com/soso/fcgi-bin/client_search_cp?n=10'
songname = input('请输入要搜索的歌名:')
songurl = songurl + "&w=" + songname + "&p=1"
reques = requests.get(songurl, headers=headers)
search()
###从上面url获取到的内容中得到songmid并赋值到下面songmids变量中,以便获取音乐真实连接的vkey信息
#https://c.y.qq.com/base/fcgi-bin/fcg_music_express_mobile3.fcg?&jsonpCallback=MusicJsonCallback&cid=205361747&songmid=' + songmids + '&filename=C400' + songmids + '.m4a&guid=0', headers=headers
#### 通过上两步得到的 songmid 和 vkey 赋值给下面对应 变量 即是音乐真实链接
#http://isure.stream.qqmusic.qq.com/C400' + songmids[n] + '.m4a?guid=0&vkey=' + vkey + '&uin=0&fromtag=66
Copy the Code
Reply
Like 0
Favorite
View the author
All Replies
heisen
deepin
2019-09-22 23:54
#1
本帖最后由 ybaojun 于 2019-9-22 15:58 编辑
沙发,抢!!!!
Reply
Like 0
View the author
jianguo922
deepin
2019-09-23 03:55
#2
谢谢分享
Reply
Like 0
View the author
Please
sign
in first
Featured Collection
Change
[Tutorial] deepin25 WSL Offline Installation Guide
UOS AI 2.8 Released! Three New Intelligent Agents & Major Evolution
Solid Q&A | deepin 25 Common Questions – The Immutable System Edition
New Thread
Popular Ranking
Change
What is the purpose of UOS AI?
Cannot upgrade "Deepin 25.0.10"
chrome browser
Feature Request: Adding an option for a "Floating Dock" mode in DDE
[Feature Request] Drop-down grid panel for window snap layouts
Popular Events
More
但发现没时间写了,还是把写了一半的接口共享出来供大家一起学习用吧,
校学生一枚,大神勿喷 , 喷子绕行 谢谢!!!
侵删,谢谢:ybaojun@hotmail.com