网易云再度升级!用Python爬取(二:源代码实现)
发布时间
阅读量:
阅读量
鉴于此,我将不再赘述,直接展示代码(相较于他人提供的需分段获取并付费下载的代码,这种方式更为便捷)
首先为歌曲下载功能的实现:
#--*encoding:utf-8*--
import contextlib
import requests
import json
import os
import time
from requests_html import HTMLSession
import pyperclip
import eyed3
download = 1
name = 1
by = 1
pic = 1
# import mp3play
def q():
os.system('cls')
def write(abc, path):
paths = path+".lrc"
with open(paths,"w") as f:
f.write(abc)
def get_download_url(id):
url = "https://api.imjad.cn/cloudmusic/?type=song&id="+str(id)+ "&br=128000"
全部评论 (0)
还没有任何评论哟~
