iyf.tv m3u8 提取工具

在 iyf.tv 播放页的浏览器控制台(F12)运行以下脚本,自动提取所有集数的 m3u8 地址并复制到剪贴板,然后粘贴到下方"服务器远程下载"的 URL 列表中。

// 在 iyf.tv 播放页 F12 控制台运行此脚本
// 自动切换每集 → 拦截 API → 提取 m3u8 地址
(async()=>{
  const eps=document.querySelectorAll('a[href*="/play/"]');
  const links=[...new Set([...eps].map(a=>a.href).filter(h=>h.includes('?id=')))];
  console.log(`找到 ${links.length} 集`);
  const map={};let i=1;
  const origOpen=XMLHttpRequest.prototype.open;
  const origSend=XMLHttpRequest.prototype.send;
  let lastResp='';
  XMLHttpRequest.prototype.open=function(m,u,...a){this._url=u;return origOpen.call(this,m,u,...a)};
  XMLHttpRequest.prototype.send=function(...a){
    this.addEventListener('load',function(){if(this._url&&this._url.includes('/v3/video/play'))lastResp=this.responseText});
    return origSend.apply(this,a)};
  for(const link of links){
    lastResp='';
    window.location.href=link;
    await new Promise(r=>setTimeout(r,4000));
    if(lastResp){
      const m=lastResp.match(/https?:\/\/[^"\\]+chunklist\.m3u8[^"\\]*/);
      if(m){map[i]=m[0];console.log(`EP${String(i).padStart(2,'0')}: OK`)}
      else console.log(`EP${String(i).padStart(2,'0')}: 未找到m3u8`)
    }else{
      // 用 Performance API 补全
      const res=performance.getEntriesByType('resource').filter(r=>r.name.includes('chunklist.m3u8'));
      if(res.length){map[i]=res[res.length-1].name;console.log(`EP${String(i).padStart(2,'0')}: OK(perf)`)}
      else console.log(`EP${String(i).padStart(2,'0')}: 失败`)
    }
    i++
  }
  XMLHttpRequest.prototype.open=origOpen;
  XMLHttpRequest.prototype.send=origSend;
  const txt=Object.keys(map).sort((a,b)=>a-b).map(k=>map[k].replace(/=/g,'[EQ]').replace(/&/g,'[AND]')).join('\n');
  copy(txt);
  console.log(`完成!${Object.keys(map).length}/${links.length} 集已复制到剪贴板`);
  console.log('粘贴到下载页面时,会自动将 [EQ] 还原为 = ,[AND] 还原为 &');
})();

上传视频文件

如果 m3u8 链接绑定了 IP 无法在服务器下载,可以在本地下载后直接上传。

服务器远程下载

服务器直接下载 m3u8/视频链接。注意:绑定 IP 的链接会失败(403)。

下载任务

暂无下载任务