用Python爬到音频下载地址,再用Internet Download Manager批量自动下载
# -*- coding: utf-8 -*- """ Created on Fri Dec 14 21:07:11 2018 @author: fuwen """ from subprocess import call import os,requests, base64, json, time import jsonpath import html from bs4 import BeautifulSoup type=1 #https://www.lrts.me/album/400485 bookid BookID = 99144 # Sections=0 #一共多少章节 Chapters=92 #保存路径 FilePath = 'd:\\mp3' #删除文件夹所有文件,并且重新建立 def delDir(TitleName): global FilePath FilePath=FilePath+"\\"+TitleName if os.path.exists(FilePath) is True: os.system('RD /q /s ' + FilePath) print() os.mkdir(FilePath) #使用IDM安装下载 IdmPath = 'd:\\Internet Download Manager\\IDMan.exe' #关闭autoit 编写程序检测弹出框点否程序 exe_name="lrts.exe" def kill_exe(exe_name): """ 杀死exe进程 :param exe_name:进程名字 :return:无 """ os.system('taskkill /f /t /im '+exe_name)#MESMTPC.exe程序名字 print("杀死进程{}".format(exe_name)) def get_json_value(json_data,key_name): '''获取到json中任意key的值,结果为list格式''' # key_value = jsonpath.jsonpath(json_data, '$..{key_name}'.format(key_name=key_name)) # https://blog.csdn.net/cling_snail/article/de