赞
踩
"format": " json", "inCharset": " utf8", "outCharset": " utf-8", "notice": " 0", "platform": " yqq.json", "needNewCode": " 0" } response = requests.get(url, params=params, headers=headers) # print(re.findall('callback\((.\*)\)', response)[0]) search_result = eval(re.findall('callback\((.\*)\)', response.text)[0]) song_info_list = search_result['data']['song']['list'] # print() tplt = "{0:<10}\t{1:<10}\t{2:<20}" print(tplt.format("序号", "歌手", "歌名")) for song_info in song_info_list: # print(song\_info) song_name = song_info['songname'] song_mid = song_info['songmid'] singer = song_info['singer'][0]['name']
找到单个音乐的请求数据接口
音乐的播放地址为purl
![在这里插入图片描述](https://img-blog.csdnimg.cn/20210527191913708.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L0FJMTk5NzAyMDU=,size_16,color_FFFFFF,t_70#pic_center)
动态提交的数据来自与同一个js文件
![在这里插入图片描述](https://img-blog.csdnimg.cn/20210527191945292.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L0FJMTk5NzAyMDU=,size_16,color_FFFFFF,t_70#pic_center)
调试js代码请求方法
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。