有些直播源网址路径不含m3u8而是以参数带m3u8结尾

This commit is contained in:
buvta
2021-01-02 21:01:59 +08:00
parent 0e0de8f23c
commit 96c68da8b7

View File

@@ -363,7 +363,7 @@ export default {
result.items.forEach(ele => {
const urls = ele.url.split('#').filter(e => e.startsWith('http')) // 网址带#时自动分割
urls.forEach(url => {
if (ele.name && url && new URL.URL(url).pathname.endsWith('.m3u8')) { // 网址可能带参数
if (ele.name && url && (url.endsWith('.m3u8') || new URL.URL(url).pathname.endsWith('.m3u8'))) { // 网址可能带参数
const doc = {
id: id,
name: ele.name,