Python网易云音乐歌单爬取

Python网易云音乐歌单爬取

代码:

from 网易云音乐复刻版 import 单曲 as ms
import requests
import re

def scrapy_playlist(list_url):
    #list_url id号
    list_url = list_url[36:]
    list_url = 'https://music.163.com/playlist?id=' + list_url
    res = requests.get(list_url).text
    res = re.findall(r"
  • ",res) for x in res: res = re.findall(r'id=(.*?)"',x) ms.develop('C:/电子书/','https://music.163.com/#/song?id='+res[0]) if __name__ == '__main__': scrapy_playlist('https://music.163.com/#/playlist?id=710924662')
  •  

    你可能感兴趣的:(python)