Comments (3)
显然,你的文件中包含了不同比特率视频的m3u8文件的位置。选择一个合适的替换原链接中的playlist.m3u8即可,比如:
https://bitdash-a.akamaihd.net/content/sintel/hls/video/250kbit.m3u8
from m3u8-downloader.
多谢反馈,多谢帮忙解答
from m3u8-downloader.
这段代码改成这样就能下载了
this.tsUrlList = []
this.finishList = []
var rtn=false;
var start=false;
// 提取 ts 视频片段地址
m3u8Str.split('\n').some((item) => {
if (item.toLowerCase().indexOf('.ts') > -1) {
this.tsUrlList.push(this.applyURL(item, this.url))
this.finishList.push({
title: item,
status: ''
})
}else if(item.toUpperCase().indexOf('#EXT-X-STREAM-INF') > -1){//找到真实地址开始的标识
start=true;
}else if(start&&item.toLowerCase().indexOf('.m3u8') > -1){//找到真实地址
var keyUrl=item;
if(keyUrl.startsWith('http')){
this.url=keyUrl;
}else{
if(keyUrl.startsWith('/')){
keyUrl=keyUrl.substring(1);
}
keyUrl=this.url.substring(0,this.url.lastIndexOf("/")+1)+keyUrl;
this.url=keyUrl;
}
console.log("keyUrl:"+keyUrl);
rtn=true;
this.getM3U8();
return true;
}
})
if(rtn){
return;
}
from m3u8-downloader.
Related Issues (20)
- 求大佬赐教
- 注入代码可以考虑使用shadowroot防止被页面css影响, 并且做成absolute浮窗不影响页面内容
- 音频失真问题 HOT 1
- Webstorm debug 出现跨域问题
- 保留原始片段文件
- 合并后的视频文件会有index问题
- 没有呀
- 基于腾讯云播sdk开发了一个m3u8在线播放器
- 在线m3u8播放器,大家可以使用
- 返回下载直链
- 网页版某音
- 打开脚本后 爱企查,百度乐玩 网站无法正常打开 HOT 1
- 下载的视频花屏 HOT 2
- 在小学生智慧平台用不起来
- 无差别工具在智慧教育平台无法使用
- 这种格式的m3u8无法下载
- What is the license?
- 由于浏览器限制,无法从 https 跳转至 http。请在访问 http 协议页面,页面 url 已复制,直接粘贴使用即可
- 装了油猴脚本可能对一些网站会有影响,可否对一些特定网站进行优化
- 使用很棒,非常感谢
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from m3u8-downloader.