yoval / lrts Goto Github PK
View Code? Open in Web Editor NEWlrts.me懒人听书免费部分及已付费部分下载
lrts.me懒人听书免费部分及已付费部分下载
之前一直用得很好,今天再用就失效了,能否更新下,谢谢!
请大侠帮忙写一个py
使用 计划执行py
Python调用FFmpeg下载流媒体直播 http://cnlive.cnr.cn/hls/bjwygb.m3u8
格式 ffmpeg -i "http://cnlive.cnr.cn/hls/bjwygb.m3u8" -c copy "年月日几点几分几秒.aac"
执行时间 12:00
结束时间 13:00
还有就是如果网络中断,延时几秒 循环 检查 FFmpeg进程是否存在,FFmpeg进程不存在,继续执行FFmpeg下载到时间结束
一直在等待,也不报错
下载 限免的时候,全部提示 未购买,能更新一下吗大佬
下载VIP的可以正常下载,就是限免的那个不可以,全都都提示未购买,前面免费的也提示
求大佬更新一下、
求修改
"""
Created on Fri Dec 14 21:07:11 2018
@author: fuwen
"""
from subprocess import call
import requests, base64, json, time, os, re
BookID = 35820
account = '[email protected]'
password = 'f0384319'
FilePath = r'D:\21'
IdmPath = 'C:\idman_lv\IDMan.exe'
def IdmDownLoad(DownloadUrl, Mp3Name):
call([IdmPath, '/d', DownloadUrl, '/p', FilePath, '/f', Mp3Name, '/n'])
def ChangeFileName(filename):
filename = filename.replace('\', '')
filename = filename.replace('/', '')
filename = filename.replace(u':', '')
filename = filename.replace('*', '')
filename = filename.replace(u'“', '')
filename = filename.replace(u'”', '')
filename = filename.replace('<', '')
filename = filename.replace('>', '')
filename = filename.replace('|', '')
filename = filename.replace('?', u'?')
filename = filename.replace(u'(', '(')
#filename = filename.replace(chr(65279), '') # UTF-8+BOM
# print(ord(filename[0]))
filename = filename.split('(')[0]
return filename
Mp3ListJsonUrl = 'http://m.lrts.me/ajax/getBookMenu?bookId=%d&pageNum=1&pageSize=5000&sortType=0' % (BookID)
headers = {
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36'}
ba_password = base64.b64encode(bytes(password))
LoginUrl = 'http://m.lrts.me/ajax/logon'
conn = requests.session()
PostData = {"account": account, "pwd": ba_password}
rep = conn.post(LoginUrl, data=PostData)
Mp3ListJson = conn.get(Mp3ListJsonUrl, headers=headers)
Mp3ListJson = json.loads(Mp3ListJson.text)
Mp3List = Mp3ListJson['list']
Mp3NameList = [Mp3dict['name'] for Mp3dict in Mp3List]
Mp3NameList = [ChangeFileName(i) for i in Mp3NameList]
AlreadyDown = [FileName.replace('.mp3', '') for FileName in os.listdir(FilePath)]
Count = 0
for Mp3Name in Mp3NameList:
Count += 1
if Mp3Name in AlreadyDown:
continue
Mp3JsonUrl = 'http://m.lrts.me/ajax/getPlayPath?entityId=%d&entityType=3&opType=1§ions=[%d]&type=0' % (
BookID, Count)
Mp3Url = conn.get(Mp3JsonUrl, headers=headers)
try:
Mp3Url = json.loads(Mp3Url.text)['list'][0]['path']
print('正在下载%s……' % Mp3Name)
IdmDownLoad(Mp3Url, Mp3Name + '.mp3')
time.sleep(2)
except:
print(u'%s,未购买,跳过……' % Mp3Name)
我关了360卫士重启idm就可以了
大神用idm下载长文件名或用特殊符号的集数会无法重命名下载到临时文件夹,还有用Aria2下载成功抓取成功推送,但是Aria2里下载没速度直接到已完成已停止里了,文件下不下来
把命名部分代码该了就行了…… 也可以把链接发下来。
试了一下,新的可以。试了最新的还是一样的问题
Originally posted by @yoval in #17 (comment)
大神用idm下载长文件名或用特殊符号的集数会无法重命名下载到临时文件夹,还有用Aria2下载成功抓取成功推送,但是Aria2里下载没速度直接到已完成已停止里了,文件下不下来
把命名部分代码该了就行了……
也可以把链接发下来。
使用 计划执行py
Python调用FFmpeg下载流媒体直播 http://cnlive.cnr.cn/hls/bjwygb.m3u8
格式 ffmpeg -i "http://cnlive.cnr.cn/hls/bjwygb.m3u8" -c copy "年月日几点几分几秒.aac"
执行时间 12:00
结束时间 13:00
还有就是如果网络中断,延时几秒 循环 检查 FFmpeg进程是否存在,FFmpeg进程不存在,继续执行FFmpeg下载到时间结束
大神用idm下载长文件名或用特殊符号的集数会无法重命名下载到临时文件夹,还有用Aria2下载成功抓取成功推送,但是Aria2里下载没速度直接到已完成已停止里了,文件下不下来
rtrt
例如:第100集开始下载,到第200集结束?
刚接触python求大佬告知!
rt
求看看
前几天下载还转正常的,今天下载选择1000-1500下载,只能下载一个999集。然后就出现自动停止了。
不知道是什么原因,求大佬解答
大佬你好,能不能增加 百听听书 爬虫?
问题描述:
运行代码后保存
Traceback (most recent call last):
File "C:\Users\Administrator\Desktop\lrts-master\lrts.py", line 86, in
AudioList = LenDetail['list']
KeyError: 'list'
===========================================================
按你的办法把 pageSize=5000 改成pageSize=50 只能解析前50集,然后就自动停止了。
求大佬帮我改一下,或者改好发出来,我搬一下,谢谢了。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.