Repository: papagaye744/iptv-go
Branch: main
Commit: 50048c3bcfab
Files: 22
Total size: 138.4 KB
Directory structure:
gitextract_wb61vjdu/
├── LICENSE
├── README.md
├── api/
│ ├── index.go
│ ├── live.go
│ └── yqk/
│ └── yqk.go
├── go.mod
├── list/
│ ├── douyuyqk.go
│ ├── huyayqk.go
│ ├── tvm3u.go
│ └── yylunbo.go
├── liveurls/
│ ├── bilibili.go
│ ├── douyin.go
│ ├── douyu.go
│ ├── huya.go
│ ├── itv.go
│ ├── youtube.go
│ ├── ysptp.go
│ └── yy.go
├── package.json
├── utils/
│ ├── http.go
│ └── jsRun.go
└── vercel.json
================================================
FILE CONTENTS
================================================
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2023 papagaye744
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
# 源仓库已闭源
建议自己部署docker的allinone使用,[https://hub.docker.com/r/youshandefeiyang/allinone](https://hub.docker.com/r/youshandefeiyang/allinone)
================================================
FILE: api/index.go
================================================
package handler
import (
"Golang/liveurls"
"Golang/list"
"Golang/utils"
"fmt"
"net/http"
"strings"
"encoding/json"
"strconv"
"log"
"os"
)
// vercel 平台会将请求传递给该函数,这个函数名随意,但函数参数必须按照该规则。
func Handler(w http.ResponseWriter, r *http.Request) {
// 是否禁用TV
enableTV := os.Getenv("TV") != "false"
path := r.URL.Path
ts := utils.DefaultQuery(r, "ts", "")
switch path {
// 电视直播
case "/tv.m3u":
if enableTV {
itvm3uobj := &list.Tvm3u{}
w.Header().Set("Content-Type", "application/octet-stream")
w.Header().Set("Content-Disposition", "attachment; filename=tv.m3u")
itvm3uobj.GetTvM3u(w, r.Host)
} else {
http.Error(w, "公共服务不提供TV直播", http.StatusForbidden)
}
// 虎牙一起看
case "/huyayqk.m3u":
yaobj := &list.HuyaYqk{}
res, _ := yaobj.HuYaYqk("https://live.cdn.huya.com/liveHttpUI/getLiveList?iGid=2135")
var result list.YaResponse
json.Unmarshal(res, &result)
pageCount := result.ITotalPage
pageSize := result.IPageSize
w.Header().Set("Content-Type", "application/octet-stream")
w.Header().Set("Content-Disposition", "attachment; filename=huyayqk.m3u")
utils.GetTestVideoUrl(w)
for i := 1; i <= pageCount; i++ {
apiRes, _ := yaobj.HuYaYqk(fmt.Sprintf("https://live.cdn.huya.com/liveHttpUI/getLiveList?iGid=2135&iPageNo=%d&iPageSize=%d", i, pageSize))
var res list.YaResponse
json.Unmarshal(apiRes, &res)
data := res.VList
for _, value := range data {
fmt.Fprintf(w, "#EXTINF:-1 tvg-logo=\"%s\" group-title=\"%s\", %s\n", value.SAvatar180, value.SGameFullName, value.SNick)
fmt.Fprintf(w, "%s/huya/%v\n", utils.GetLivePrefix(r), value.LProfileRoom)
}
}
// 斗鱼一起看
case "/douyuyqk.m3u":
yuobj := &list.DouYuYqk{}
resAPI, _ := yuobj.Douyuyqk("https://www.douyu.com/gapi/rkc/directory/mixList/2_208/list")
var result list.DouYuResponse
json.Unmarshal(resAPI, &result)
pageCount := result.Data.Pgcnt
w.Header().Set("Content-Type", "application/octet-stream")
w.Header().Set("Content-Disposition", "attachment; filename=douyuyqk.m3u")
utils.GetTestVideoUrl(w)
for i := 1; i <= pageCount; i++ {
apiRes, _ := yuobj.Douyuyqk("https://www.douyu.com/gapi/rkc/directory/mixList/2_208/" + strconv.Itoa(i))
var res list.DouYuResponse
json.Unmarshal(apiRes, &res)
data := res.Data.Rl
for _, value := range data {
fmt.Fprintf(w, "#EXTINF:-1 tvg-logo=\"https://apic.douyucdn.cn/upload/%s_big.jpg\" group-title=\"%s\", %s\n", value.Av, value.C2name, value.Nn)
fmt.Fprintf(w, "%s/douyu/%v\n", utils.GetLivePrefix(r), value.Rid)
}
}
// YY轮播
case "/yylunbo.m3u":
yylistobj := &list.Yylist{}
w.Header().Set("Content-Type", "application/octet-stream")
w.Header().Set("Content-Disposition", "attachment; filename=yylunbo.m3u")
utils.GetTestVideoUrl(w)
i := 1
for {
apiRes := yylistobj.Yylb(fmt.Sprintf("http://rubiks-ipad.yy.com/nav/other/idx/213?channel=appstore&ispType=0&model=iPad8,6&netType=2&os=iOS&osVersion=17.2&page=%d&uid=0&yyVersion=6.17.0", i))
var res list.ApiResponse
json.Unmarshal([]byte(apiRes), &res)
for _, value := range res.Data.Data {
fmt.Fprintf(w, "#EXTINF:-1 tvg-logo=\"%s\" group-title=\"%s\", %s\n", value.Avatar, value.Biz, value.Desc)
fmt.Fprintf(w, "%s/yy/%v\n", utils.GetLivePrefix(r), value.Sid)
}
if res.Data.IsLastPage == 1 {
break
}
i++
}
// 其他链接
default:
adurl := "https://cdn.jsdelivr.net/gh/feiyangdigital/testvideo/sdr1080pvideo/index.m3u8"
params := strings.Split(path, "/")
// log.Println("request url: ", path)
if len(params) >= 3 {
// 解析成功
// 平台
platform := params[1]
// 房间号
rid := params[2]
// fmt.Fprintf(w, "parsed platform=%s, room=%s", platform, rid)
switch platform {
case "itv":
if enableTV {
itvobj := &liveurls.Itv{}
cdn := utils.DefaultQuery(r, "cdn", "")
if ts == "" {
itvobj.HandleMainRequest(w, r, cdn, rid)
} else {
itvobj.HandleTsRequest(w, ts)
}
} else {
http.Error(w, "公共服务不提供TV直播", http.StatusForbidden)
}
case "ysptp":
if enableTV {
ysptpobj := &liveurls.Ysptp{}
if ts == "" {
ysptpobj.HandleMainRequest(w, r, rid)
} else {
ysptpobj.HandleTsRequest(w, ts, utils.DefaultQuery(r, "wsTime", ""))
}
} else {
http.Error(w, "公共服务不提供TV直播", http.StatusForbidden)
}
case "douyin":
// 抖音
douyinobj := &liveurls.Douyin{}
douyinobj.Rid = rid
douyinobj.Stream = utils.DefaultQuery(r, "stream", "flv")
http.Redirect(w, r, utils.Duanyan(adurl, douyinobj.GetDouYinUrl()), http.StatusMovedPermanently)
case "douyu":
// 斗鱼
douyuobj := &liveurls.Douyu{}
douyuobj.Rid = rid
douyuobj.Stream_type = utils.DefaultQuery(r, "stream", "flv")
http.Redirect(w, r, utils.Duanyan(adurl, douyuobj.GetRealUrl()), http.StatusMovedPermanently)
case "huya":
// 虎牙
huyaobj := &liveurls.Huya{}
huyaobj.Rid = rid
huyaobj.Cdn = utils.DefaultQuery(r, "cdn", "hwcdn")
huyaobj.Media = utils.DefaultQuery(r, "media", "flv")
huyaobj.Type = utils.DefaultQuery(r, "cdntype", "nodisplay")
if huyaobj.Type == "display" {
fmt.Fprintf(w, huyaobj.GetLiveUrl().(string))
} else {
http.Redirect(w, r, utils.Duanyan(adurl, huyaobj.GetLiveUrl()), http.StatusMovedPermanently)
}
case "bilibili":
// B站
biliobj := &liveurls.BiliBili{}
biliobj.Rid = rid
biliobj.Platform = utils.DefaultQuery(r, "platform", "web")
biliobj.Quality = utils.DefaultQuery(r, "quality", "10000")
biliobj.Line = utils.DefaultQuery(r, "line", "first")
http.Redirect(w, r, utils.Duanyan(adurl, biliobj.GetPlayUrl()), http.StatusMovedPermanently)
case "youtube":
// 油管
ytbObj := &liveurls.Youtube{}
ytbObj.Rid = rid
ytbObj.Quality = utils.DefaultQuery(r, "quality", "1080")
http.Redirect(w, r, utils.Duanyan(adurl, ytbObj.GetLiveUrl()), http.StatusMovedPermanently)
case "yy":
// YY直播
yyObj := &liveurls.Yy{}
yyObj.Rid = rid
yyObj.Quality = utils.DefaultQuery(r, "quality", "4")
http.Redirect(w, r, utils.Duanyan(adurl, yyObj.GetLiveUrl()), http.StatusMovedPermanently)
default:
fmt.Fprintf(w, "Unknown platform=%s, room=%s", platform, rid)
}
} else {
log.Println("Invalid path:", path)
w.Header().Set("Content-Type", "text/html; charset=utf-8")
// http.Error(w, "链接错误!", http.StatusInternalServerError)
fmt.Fprintf(w, "<h1>参数错误!</h1></br><p><a href='https://github.com/youshandefeiyang/LiveRedirect/blob/main/Golang/README.md'>使用教程</a></p>")
}
// log.Println("Invalid path:", path)
// fmt.Fprintf(w, "<h1>链接错误!</h1>")
}
return
}
================================================
FILE: api/live.go
================================================
package handler
import (
"Golang/liveurls"
"Golang/utils"
"fmt"
"net/http"
"strings"
"log"
"os"
)
// vercel 平台会将请求传递给该函数,这个函数名随意,但函数参数必须按照该规则。
func Handler(w http.ResponseWriter, r *http.Request) {
adurl := "https://cdn.jsdelivr.net/gh/feiyangdigital/testvideo/sdr1080pvideo/index.m3u8"
path := r.URL.Path
params := strings.Split(path, "/")
// 是否禁用TV
enableTV := os.Getenv("TV") != "false"
// fmt.Fprintf(w, "request url: %s", path)
if len(params) >= 4 {
// 解析成功
// 平台
platform := params[2]
// 房间号
rid := params[3]
ts := utils.DefaultQuery(r, "ts", "")
// fmt.Fprintf(w, "parsed platform=%s, room=%s", platform, rid)
switch platform {
case "itv":
if enableTV {
itvobj := &liveurls.Itv{}
cdn := utils.DefaultQuery(r, "cdn", "")
if ts == "" {
itvobj.HandleMainRequest(w, r, cdn, rid)
} else {
itvobj.HandleTsRequest(w, ts)
}
} else {
http.Error(w, "公共服务不提供TV直播", http.StatusForbidden)
}
case "ysptp":
if enableTV {
ysptpobj := &liveurls.Ysptp{}
if ts == "" {
ysptpobj.HandleMainRequest(w, r, rid)
} else {
ysptpobj.HandleTsRequest(w, ts, utils.DefaultQuery(r, "wsTime", ""))
}
} else {
http.Error(w, "公共服务不提供TV直播", http.StatusForbidden)
}
case "douyin":
// 抖音
douyinobj := &liveurls.Douyin{}
douyinobj.Rid = rid
douyinobj.Stream = utils.DefaultQuery(r, "stream", "flv")
http.Redirect(w, r, utils.Duanyan(adurl, douyinobj.GetDouYinUrl()), http.StatusMovedPermanently)
case "douyu":
// 斗鱼
douyuobj := &liveurls.Douyu{}
douyuobj.Rid = rid
douyuobj.Stream_type = utils.DefaultQuery(r, "stream", "flv")
http.Redirect(w, r, utils.Duanyan(adurl, douyuobj.GetRealUrl()), http.StatusMovedPermanently)
case "huya":
// 虎牙
huyaobj := &liveurls.Huya{}
huyaobj.Rid = rid
huyaobj.Cdn = utils.DefaultQuery(r, "cdn", "hwcdn")
huyaobj.Media = utils.DefaultQuery(r, "media", "flv")
huyaobj.Type = utils.DefaultQuery(r, "cdntype", "nodisplay")
if huyaobj.Type == "display" {
fmt.Fprintf(w, huyaobj.GetLiveUrl().(string))
} else {
http.Redirect(w, r, utils.Duanyan(adurl, huyaobj.GetLiveUrl()), http.StatusMovedPermanently)
}
case "bilibili":
// B站
biliobj := &liveurls.BiliBili{}
biliobj.Rid = rid
biliobj.Platform = utils.DefaultQuery(r, "platform", "web")
biliobj.Quality = utils.DefaultQuery(r, "quality", "10000")
biliobj.Line = utils.DefaultQuery(r, "line", "first")
http.Redirect(w, r, utils.Duanyan(adurl, biliobj.GetPlayUrl()), http.StatusMovedPermanently)
case "youtube":
// 油管
ytbObj := &liveurls.Youtube{}
ytbObj.Rid = rid
ytbObj.Quality = utils.DefaultQuery(r, "quality", "1080")
http.Redirect(w, r, utils.Duanyan(adurl, ytbObj.GetLiveUrl()), http.StatusMovedPermanently)
case "yy":
// YY直播
yyObj := &liveurls.Yy{}
yyObj.Rid = rid
yyObj.Quality = utils.DefaultQuery(r, "quality", "4")
http.Redirect(w, r, utils.Duanyan(adurl, yyObj.GetLiveUrl()), http.StatusMovedPermanently)
default:
fmt.Fprintf(w, "Unknown platform=%s, room=%s", platform, rid)
}
} else {
log.Println("Invalid path:", path)
http.Error(w, "Internal Server Error", http.StatusInternalServerError)
}
}
================================================
FILE: api/yqk/yqk.go
================================================
package yqk
import (
"Golang/list"
"Golang/utils"
"fmt"
"encoding/json"
"net/http"
"strconv"
"log"
)
// vercel 平台会将请求传递给该函数,这个函数名随意,但函数参数必须按照该规则。
// go语言大写就是公开,所以首字母必须大写
func Handler(w http.ResponseWriter, r *http.Request) {
path := r.URL.Path
switch path {
case "/yqk/huyayqk.m3u":
yaobj := &list.HuyaYqk{}
res, _ := yaobj.HuYaYqk("https://live.cdn.huya.com/liveHttpUI/getLiveList?iGid=2135")
var result list.YaResponse
json.Unmarshal(res, &result)
pageCount := result.ITotalPage
pageSize := result.IPageSize
w.Header().Set("Content-Type", "application/octet-stream")
w.Header().Set("Content-Disposition", "attachment; filename=huyayqk.m3u")
utils.GetTestVideoUrl(w)
for i := 1; i <= pageCount; i++ {
apiRes, _ := yaobj.HuYaYqk(fmt.Sprintf("https://live.cdn.huya.com/liveHttpUI/getLiveList?iGid=2135&iPageNo=%d&iPageSize=%d", i, pageSize))
var res list.YaResponse
json.Unmarshal(apiRes, &res)
data := res.VList
for _, value := range data {
fmt.Fprintf(w, "#EXTINF:-1 tvg-logo=\"%s\" group-title=\"%s\", %s\n", value.SAvatar180, value.SGameFullName, value.SNick)
fmt.Fprintf(w, "%s/huya/%v\n", utils.GetLivePrefix(r), value.LProfileRoom)
}
}
case "/yqk/douyuyqk.m3u":
yuobj := &list.DouYuYqk{}
resAPI, _ := yuobj.Douyuyqk("https://www.douyu.com/gapi/rkc/directory/mixList/2_208/list")
var result list.DouYuResponse
json.Unmarshal(resAPI, &result)
pageCount := result.Data.Pgcnt
w.Header().Set("Content-Type", "application/octet-stream")
w.Header().Set("Content-Disposition", "attachment; filename=douyuyqk.m3u")
utils.GetTestVideoUrl(w)
for i := 1; i <= pageCount; i++ {
apiRes, _ := yuobj.Douyuyqk("https://www.douyu.com/gapi/rkc/directory/mixList/2_208/" + strconv.Itoa(i))
var res list.DouYuResponse
json.Unmarshal(apiRes, &res)
data := res.Data.Rl
for _, value := range data {
fmt.Fprintf(w, "#EXTINF:-1 tvg-logo=\"https://apic.douyucdn.cn/upload/%s_big.jpg\" group-title=\"%s\", %s\n", value.Av, value.C2name, value.Nn)
fmt.Fprintf(w, "%s/douyu/%v\n", utils.GetLivePrefix(r), value.Rid)
}
}
case "/yqk/yylunbo.m3u":
yylistobj := &list.Yylist{}
w.Header().Set("Content-Type", "application/octet-stream")
w.Header().Set("Content-Disposition", "attachment; filename=yylunbo.m3u")
utils.GetTestVideoUrl(w)
i := 1
for {
apiRes := yylistobj.Yylb(fmt.Sprintf("http://rubiks-ipad.yy.com/nav/other/idx/213?channel=appstore&ispType=0&model=iPad8,6&netType=2&os=iOS&osVersion=17.2&page=%d&uid=0&yyVersion=6.17.0", i))
var res list.ApiResponse
json.Unmarshal([]byte(apiRes), &res)
for _, value := range res.Data.Data {
fmt.Fprintf(w, "#EXTINF:-1 tvg-logo=\"%s\" group-title=\"%s\", %s\n", value.Avatar, value.Biz, value.Desc)
fmt.Fprintf(w, "%s/yy/%v\n", utils.GetLivePrefix(r), value.Sid)
}
if res.Data.IsLastPage == 1 {
break
}
i++
}
default:
log.Println("Invalid path:", path)
fmt.Fprintf(w, "<h1>链接错误!</h1>")
}
}
================================================
FILE: go.mod
================================================
module Golang
go 1.19
require (
github.com/dop251/goja v0.0.0-20230203172422-5460598cfa32
github.com/etherlabsio/go-m3u8 v1.0.0
github.com/forgoer/openssl v1.5.0
github.com/gin-gonic/gin v1.8.2
github.com/hr3lxphr6j/bililive-go v0.7.23
github.com/hr3lxphr6j/requests v0.0.2
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b
github.com/tidwall/gjson v1.14.4
)
================================================
FILE: list/douyuyqk.go
================================================
// Package list
// @Time:2023/06/02 10:00
// @File:mian.go
// @SoftWare:Goland
// @Author:feiyang
// @Contact:TG@feiyangdigital
package list
import (
"io"
"net/http"
)
type DouYuYqk struct {
}
type DouYuResponse struct {
Data struct {
Pgcnt int `json:"pgcnt"`
Rl []struct {
Av string `json:"av"`
C2name string `json:"c2name"`
Nn string `json:"nn"`
Rid int `json:"rid"`
} `json:"rl"`
} `json:"data"`
}
func (dy *DouYuYqk) Douyuyqk(requestURL string) ([]byte, error) {
client := &http.Client{}
req, err := http.NewRequest("GET", requestURL, nil)
if err != nil {
return nil, err
}
req.Header.Set("upgrade-insecure-requests", "1")
req.Header.Set("user-agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36")
resp, err := client.Do(req)
if err != nil {
return nil, err
}
defer resp.Body.Close()
return io.ReadAll(resp.Body)
}
================================================
FILE: list/huyayqk.go
================================================
// Package list
// @Time:2023/06/02 10:00
// @File:mian.go
// @SoftWare:Goland
// @Author:feiyang
// @Contact:TG@feiyangdigital
package list
import (
"io"
"net/http"
)
type HuyaYqk struct {
}
type YaResponse struct {
ITotalPage int `json:"iTotalPage"`
IPageSize int `json:"iPageSize"`
VList []struct {
SAvatar180 string `json:"sAvatar180"`
SGameFullName string `json:"sGameFullName"`
SNick string `json:"sNick"`
LProfileRoom int `json:"lProfileRoom"`
} `json:"vList"`
}
func (hy *HuyaYqk) HuYaYqk(requestURL string) ([]byte, error) {
client := &http.Client{}
req, err := http.NewRequest("GET", requestURL, nil)
if err != nil {
return nil, err
}
req.Header.Set("upgrade-insecure-requests", "1")
req.Header.Set("user-agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36")
resp, err := client.Do(req)
if err != nil {
return nil, err
}
defer resp.Body.Close()
return io.ReadAll(resp.Body)
}
================================================
FILE: list/tvm3u.go
================================================
package list
import (
"fmt"
"net/http"
)
type Tvm3u struct {
}
func (t *Tvm3u) GetTvM3u(w http.ResponseWriter, hostname string) {
fmt.Fprintln(w, "#EXTM3U x-tvg-url=\"https://epg.v1.mk/fy.xml\"")
fmt.Fprintln(w, "#EXTINF:-1 tvg-name=\"4K60PSDR-H264-AAC测试\" tvg-logo=\"https://cdn.jsdelivr.net/gh/feiyangdigital/testvideo/tg.jpg\" group-title=\"4K频道\",4K60PSDR-H264-AAC测试")
fmt.Fprintln(w, "https://cdn.jsdelivr.net/gh/feiyangdigital/testvideo/sdr4kvideo/index.m3u8")
fmt.Fprintln(w, "#EXTINF:-1 tvg-name=\"4K60PHLG-HEVC-EAC3测试\" tvg-logo=\"https://cdn.jsdelivr.net/gh/feiyangdigital/testvideo/tg.jpg\" group-title=\"4K频道\",4K60PHLG-HEVC-EAC3测试")
fmt.Fprintln(w, "https://cdn.jsdelivr.net/gh/feiyangdigital/testvideo/hlg4kvideo/index.m3u8")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"CCTV1\" tvg-name=\"CCTV1\" tvg-logo=\"https://epg.v1.mk/logo/CCTV1.png\" group-title=\"央视\",cctv1-高码")
fmt.Fprintln(w, "http://"+hostname+"/ysptp/cctv1.m3u8")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"CCTV1\" tvg-name=\"CCTV1\" tvg-logo=\"https://epg.v1.mk/logo/CCTV1.png\" group-title=\"央视\",CCTV-1")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000001000029752.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv1\" tvg-name=\"cctv1\" tvg-logo=\"https://epg.v1.mk/logo/cctv1.png\" group-title=\"央视\",CCTV-1-50-FPS")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000004000002226.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"CCTV1\" tvg-name=\"CCTV1\" tvg-logo=\"https://epg.v1.mk/logo/CCTV1.png\" group-title=\"央视\",CCTV-1-HEVC")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000005000265001.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv2\" tvg-name=\"cctv2\" tvg-logo=\"https://epg.v1.mk/logo/cctv2.png\" group-title=\"央视\",cctv2-高码")
fmt.Fprintln(w, "http://"+hostname+"/ysptp/cctv2.m3u8")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv2\" tvg-name=\"cctv2\" tvg-logo=\"https://epg.v1.mk/logo/cctv2.png\" group-title=\"央视\",CCTV-2")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000001000023315.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"CCTV2\" tvg-name=\"CCTV2\" tvg-logo=\"https://epg.v1.mk/logo/CCTV2.png\" group-title=\"央视\",CCTV-2-50-FPS")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000001000014161.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv2\" tvg-name=\"cctv2\" tvg-logo=\"https://epg.v1.mk/logo/cctv2.png\" group-title=\"央视\",CCTV-2-HEVC")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000001000023315.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv3\" tvg-name=\"cctv3\" tvg-logo=\"https://epg.v1.mk/logo/cctv3.png\" group-title=\"央视\",cctv3-高码")
fmt.Fprintln(w, "http://"+hostname+"/ysptp/cctv3.m3u8")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv3\" tvg-name=\"cctv3\" tvg-logo=\"https://epg.v1.mk/logo/cctv3.png\" group-title=\"央视\",CCTV-3")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000001000022313.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv3\" tvg-name=\"cctv3\" tvg-logo=\"https://epg.v1.mk/logo/cctv3.png\" group-title=\"央视\",CCTV-3-HEVC")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000005000265003.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv4\" tvg-name=\"cctv4\" tvg-logo=\"https://epg.v1.mk/logo/cctv4.png\" group-title=\"央视\",cctv4-高码")
fmt.Fprintln(w, "http://"+hostname+"/ysptp/cctv4.m3u8")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"CCTV4\" tvg-name=\"CCTV4\" tvg-logo=\"https://epg.v1.mk/logo/CCTV4.png\" group-title=\"央视\",CCTV-4-50-FPS")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000011000031102.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv4\" tvg-name=\"cctv4\" tvg-logo=\"https://epg.v1.mk/logo/cctv4.png\" group-title=\"央视\",CCTV-4-HEVC")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000005000265004.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv5\" tvg-name=\"cctv5\" tvg-logo=\"https://epg.v1.mk/logo/cctv5.png\" group-title=\"央视\",cctv5-高码")
fmt.Fprintln(w, "http://"+hostname+"/ysptp/cctv5.m3u8")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv5\" tvg-name=\"cctv5\" tvg-logo=\"https://epg.v1.mk/logo/cctv5.png\" group-title=\"央视\",CCTV-5")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000005000025222.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv5\" tvg-name=\"cctv5\" tvg-logo=\"https://epg.v1.mk/logo/cctv5.png\" group-title=\"央视\",CCTV-5-HEVC")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000005000265005.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv5+\" tvg-name=\"cctv5+\" tvg-logo=\"https://epg.v1.mk/logo/cctv5+.png\" group-title=\"央视\",cctv5p-高码")
fmt.Fprintln(w, "http://"+hostname+"/ysptp/cctv5p.m3u8")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv5+\" tvg-name=\"cctv5+\" tvg-logo=\"https://epg.v1.mk/logo/cctv5+.png\" group-title=\"央视\",CCTV-5+")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000001000015875.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv5+\" tvg-name=\"cctv5+\" tvg-logo=\"https://epg.v1.mk/logo/cctv5+.png\" group-title=\"央视\",CCTV-5+-HEVC")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000005000265016.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv6\" tvg-name=\"cctv6\" tvg-logo=\"https://epg.v1.mk/logo/cctv6.png\" group-title=\"央视\",cctv6-高码")
fmt.Fprintln(w, "http://"+hostname+"/ysptp/cctv6.m3u8")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv6\" tvg-name=\"cctv6\" tvg-logo=\"https://epg.v1.mk/logo/cctv6.png\" group-title=\"央视\",CCTV-6")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000001000001737.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"CCTV6\" tvg-name=\"CCTV6\" tvg-logo=\"https://epg.v1.mk/logo/CCTV6.png\" group-title=\"央视\",CCTV-6-50-FPS")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000001000004574.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv6\" tvg-name=\"cctv6\" tvg-logo=\"https://epg.v1.mk/logo/cctv6.png\" group-title=\"央视\",CCTV-6-HEVC")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000005000265006.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"CCTV7\" tvg-name=\"CCTV7\" tvg-logo=\"https://epg.v1.mk/logo/CCTV7.png\" group-title=\"央视\",cctv7-高码")
fmt.Fprintln(w, "http://"+hostname+"/ysptp/cctv7.m3u8")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"CCTV7\" tvg-name=\"CCTV7\" tvg-logo=\"https://epg.v1.mk/logo/CCTV7.png\" group-title=\"央视\",CCTV-7")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000001000024341.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"CCTV7\" tvg-name=\"CCTV7\" tvg-logo=\"https://epg.v1.mk/logo/CCTV7.png\" group-title=\"央视\",CCTV-7-50-FPS")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000001000009055.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"CCTV7\" tvg-name=\"CCTV7\" tvg-logo=\"https://epg.v1.mk/logo/CCTV7.png\" group-title=\"央视\",CCTV-7-HEVC")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000005000265007.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv8\" tvg-name=\"cctv8\" tvg-logo=\"https://epg.v1.mk/logo/cctv8.png\" group-title=\"央视\",cctv8-高码")
fmt.Fprintln(w, "http://"+hostname+"/ysptp/cctv8.m3u8")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv8\" tvg-name=\"cctv8\" tvg-logo=\"https://epg.v1.mk/logo/cctv8.png\" group-title=\"央视\",CCTV-8")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000001000001070.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv8\" tvg-name=\"cctv8\" tvg-logo=\"https://epg.v1.mk/logo/cctv8.png\" group-title=\"央视\",CCTV-8-HEVC")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000005000265008.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv9\" tvg-name=\"cctv9\" tvg-logo=\"https://epg.v1.mk/logo/cctv9.png\" group-title=\"央视\",cctv9-高码")
fmt.Fprintln(w, "http://"+hostname+"/ysptp/cctv9.m3u8")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv9\" tvg-name=\"cctv9\" tvg-logo=\"https://epg.v1.mk/logo/cctv9.png\" group-title=\"央视\",CCTV-9")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000001000014583.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"CCTV9\" tvg-name=\"CCTV9\" tvg-logo=\"https://epg.v1.mk/logo/CCTV9.png\" group-title=\"央视\",CCTV-9-50-FPS")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000001000032162.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv9\" tvg-name=\"cctv9\" tvg-logo=\"https://epg.v1.mk/logo/cctv9.png\" group-title=\"央视\",CCTV-9-HEVC")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000005000265009.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv10\" tvg-name=\"cctv10\" tvg-logo=\"https://epg.v1.mk/logo/cctv10.png\" group-title=\"央视\",cctv10-高码")
fmt.Fprintln(w, "http://"+hostname+"/ysptp/cctv10.m3u8")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv10\" tvg-name=\"cctv10\" tvg-logo=\"https://epg.v1.mk/logo/cctv10.png\" group-title=\"央视\",CCTV-10")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000001000023734.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv10\" tvg-name=\"cctv10\" tvg-logo=\"https://epg.v1.mk/logo/cctv10.png\" group-title=\"央视\",CCTV-10-50-FPS")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000004000012827.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv10\" tvg-name=\"cctv10\" tvg-logo=\"https://epg.v1.mk/logo/cctv10.png\" group-title=\"央视\",CCTV-10-HEVC")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000005000265010.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv11\" tvg-name=\"cctv11\" tvg-logo=\"https://epg.v1.mk/logo/cctv11.png\" group-title=\"央视\",cctv11-高码")
fmt.Fprintln(w, "http://"+hostname+"/ysptp/cctv11.m3u8")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv11\" tvg-name=\"cctv11\" tvg-logo=\"https://epg.v1.mk/logo/cctv11.png\" group-title=\"央视\",CCTV-11-50-FPS")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000011000031106.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv11\" tvg-name=\"cctv11\" tvg-logo=\"https://epg.v1.mk/logo/cctv11.png\" group-title=\"央视\",CCTV-11-HEVC")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000005000265011.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv12\" tvg-name=\"cctv12\" tvg-logo=\"https://epg.v1.mk/logo/cctv12.png\" group-title=\"央视\",cctv12-高码")
fmt.Fprintln(w, "http://"+hostname+"/ysptp/cctv12.m3u8")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv12\" tvg-name=\"cctv12\" tvg-logo=\"https://epg.v1.mk/logo/cctv12.png\" group-title=\"央视\",CCTV-12")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000001000032494.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv12\" tvg-name=\"cctv12\" tvg-logo=\"https://epg.v1.mk/logo/cctv12.png\" group-title=\"央视\",CCTV-12-50-FPS")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000001000022586.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv12\" tvg-name=\"cctv12\" tvg-logo=\"https://epg.v1.mk/logo/cctv12.png\" group-title=\"央视\",CCTV-12-HEVC")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000005000265012.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv13\" tvg-name=\"cctv13\" tvg-logo=\"https://epg.v1.mk/logo/cctv13.png\" group-title=\"央视\",cctv13-高码")
fmt.Fprintln(w, "http://"+hostname+"/ysptp/cctv13.m3u8")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv13\" tvg-name=\"cctv13\" tvg-logo=\"https://epg.v1.mk/logo/cctv13.png\" group-title=\"央视\",CCTV-13-50-FPS")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000011000031108.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv14\" tvg-name=\"cctv14\" tvg-logo=\"https://epg.v1.mk/logo/cctv14.png\" group-title=\"央视\",cctv14-高码")
fmt.Fprintln(w, "http://"+hostname+"/ysptp/cctv14.m3u8")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv14\" tvg-name=\"cctv14\" tvg-logo=\"https://epg.v1.mk/logo/cctv14.png\" group-title=\"央视\",CCTV-14")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000001000008170.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv14\" tvg-name=\"cctv14\" tvg-logo=\"https://epg.v1.mk/logo/cctv14.png\" group-title=\"央视\",CCTV-14-50-FPS")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000004000006673.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv14\" tvg-name=\"cctv14\" tvg-logo=\"https://epg.v1.mk/logo/cctv14.png\" group-title=\"央视\",CCTV-14-HEVC")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000005000265013.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv15\" tvg-name=\"cctv15\" tvg-logo=\"https://epg.v1.mk/logo/cctv15.png\" group-title=\"央视\",cctv15-高码")
fmt.Fprintln(w, "http://"+hostname+"/ysptp/cctv15.m3u8")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv15\" tvg-name=\"cctv15\" tvg-logo=\"https://epg.v1.mk/logo/cctv15.png\" group-title=\"央视\",CCTV-15-50-FPS")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000011000031109.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv15\" tvg-name=\"cctv15\" tvg-logo=\"https://epg.v1.mk/logo/cctv15.png\" group-title=\"央视\",CCTV-15-HEVC")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000005000265014.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv16\" tvg-name=\"cctv16\" tvg-logo=\"https://epg.v1.mk/logo/cctv16.png\" group-title=\"央视\",cctv16-高码")
fmt.Fprintln(w, "http://"+hostname+"/ysptp/cctv16.m3u8")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv16\" tvg-name=\"cctv16\" tvg-logo=\"https://epg.v1.mk/logo/cctv16.png\" group-title=\"央视\",CCTV-16")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000006000233002.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv16\" tvg-name=\"cctv16\" tvg-logo=\"https://epg.v1.mk/logo/cctv16.png\" group-title=\"4K频道\",CCTV-16-4K-HEVC")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000008000023254.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv16\" tvg-name=\"cctv16\" tvg-logo=\"https://epg.v1.mk/logo/cctv16.png\" group-title=\"4K频道\",cctv164k_10m")
fmt.Fprintln(w, "http://"+hostname+"/ysptp/cctv4k16_10m.m3u8")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv16\" tvg-name=\"cctv16\" tvg-logo=\"https://epg.v1.mk/logo/cctv16.png\" group-title=\"4K频道\",cctv164k")
fmt.Fprintln(w, "http://"+hostname+"/ysptp/cctv4k16.m3u8")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv17\" tvg-name=\"cctv17\" tvg-logo=\"https://epg.v1.mk/logo/cctv17.png\" group-title=\"央视\",cctv17-高码")
fmt.Fprintln(w, "http://"+hostname+"/ysptp/cctv17.m3u8")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv17\" tvg-name=\"cctv17\" tvg-logo=\"https://epg.v1.mk/logo/cctv17.png\" group-title=\"央视\",CCTV-17")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000006000268004.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv17\" tvg-name=\"cctv17\" tvg-logo=\"https://epg.v1.mk/logo/cctv17.png\" group-title=\"央视\",CCTV-17-HEVC")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000005000265015.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cgtn\" tvg-name=\"cgtn\" tvg-logo=\"https://epg.v1.mk/logo/cgtn.png\" group-title=\"央视\",CGTN")
fmt.Fprintln(w, "http://"+hostname+"/itv/7745129417417101820.m3u8?cdn=hnbblive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"CGTN记录\" tvg-name=\"CGTN记录\" tvg-logo=\"https://epg.v1.mk/logo/CGTN记录.png\" group-title=\"央视\",CGTN-记录")
fmt.Fprintln(w, "http://"+hostname+"/itv/7114647837765104058.m3u8?cdn=hnbblive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"CGTNALBY\" tvg-name=\"CGTNALBY\" tvg-logo=\"https://epg.v1.mk/logo/CGTNALBY.png\" group-title=\"央视\",cgtnar-高码")
fmt.Fprintln(w, "http://"+hostname+"/ysptp/cgtnar.m3u8")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cgtndocumentary\" tvg-name=\"cgtndocumentary\" tvg-logo=\"https://epg.v1.mk/logo/cgtndocumentary.png\" group-title=\"央视\",cgtndoc-高码")
fmt.Fprintln(w, "http://"+hostname+"/ysptp/cgtndoc.m3u8")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"CGTNEY\" tvg-name=\"CGTNEY\" tvg-logo=\"https://epg.v1.mk/logo/CGTNEY.png\" group-title=\"央视\",cgtnen-高码")
fmt.Fprintln(w, "http://"+hostname+"/ysptp/cgtnen.m3u8")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cgtnfrench\" tvg-name=\"cgtnfrench\" tvg-logo=\"https://epg.v1.mk/logo/cgtnfrench.png\" group-title=\"央视\",cgtnfr-高码")
fmt.Fprintln(w, "http://"+hostname+"/ysptp/cgtnfr.m3u8")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"CGTN1\" tvg-name=\"CGTN1\" tvg-logo=\"https://epg.v1.mk/logo/CGTN1.png\" group-title=\"央视\",cgtnru-高码")
fmt.Fprintln(w, "http://"+hostname+"/ysptp/cgtnru.m3u8")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"CGTN1\" tvg-name=\"CGTN1\" tvg-logo=\"https://epg.v1.mk/logo/CGTN1.png\" group-title=\"央视\",cgtnsp-高码")
fmt.Fprintln(w, "http://"+hostname+"/ysptp/cgtnsp.m3u8")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv4k\" tvg-name=\"cctv4k\" tvg-logo=\"https://epg.v1.mk/logo/cctv4k.png\" group-title=\"4K频道\",cctv4k_10m")
fmt.Fprintln(w, "http://"+hostname+"/ysptp/cctv4k_10m.m3u8")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv4k\" tvg-name=\"cctv4k\" tvg-logo=\"https://epg.v1.mk/logo/cctv4k.png\" group-title=\"4K频道\",cctv4k")
fmt.Fprintln(w, "http://"+hostname+"/ysptp/cctv4k.m3u8")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv8k\" tvg-name=\"cctv8k\" tvg-logo=\"https://epg.v1.mk/logo/cctv8k.png\" group-title=\"8K频道\",cctv8k_36m")
fmt.Fprintln(w, "http://"+hostname+"/ysptp/cctv8k_36m.m3u8")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"cctv8k\" tvg-name=\"cctv8k\" tvg-logo=\"https://epg.v1.mk/logo/cctv8k.png\" group-title=\"8K频道\",cctv8k_120m")
fmt.Fprintln(w, "http://"+hostname+"/ysptp/cctv8k_120m.m3u8")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"中国教育1台\" tvg-name=\"中国教育1台\" tvg-logo=\"https://epg.v1.mk/logo/中国教育1台.png\" group-title=\"其他\",中国教育电视台-1")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000002000002652.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"中国教育1台\" tvg-name=\"中国教育1台\" tvg-logo=\"https://epg.v1.mk/logo/中国教育1台.png\" group-title=\"其他\",中国教育电视台-4")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000011000031126.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"北京卫视\" tvg-name=\"北京卫视\" tvg-logo=\"https://epg.v1.mk/logo/北京卫视.png\" group-title=\"北京\",北京卫视")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000001000020451.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"北京卫视\" tvg-name=\"北京卫视\" tvg-logo=\"https://epg.v1.mk/logo/北京卫视.png\" group-title=\"北京\",北京卫视-HEVC")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000005000265027.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"北京纪实科教\" tvg-name=\"北京纪实科教\" tvg-logo=\"https://epg.v1.mk/logo/北京纪实科教.png\" group-title=\"北京\",北京纪实科教")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000001000001910.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"北京纪实科教\" tvg-name=\"北京纪实科教\" tvg-logo=\"https://epg.v1.mk/logo/北京纪实科教.png\" group-title=\"北京\",北京纪实科教-HEVC")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000005000265020.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"北京卡酷少儿\" tvg-name=\"北京卡酷少儿\" tvg-logo=\"https://epg.v1.mk/logo/北京卡酷少儿.png\" group-title=\"北京\",北京卡酷少儿")
fmt.Fprintln(w, "http://"+hostname+"/itv/7851974109718180595.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"安徽卫视\" tvg-name=\"安徽卫视\" tvg-logo=\"https://epg.v1.mk/logo/安徽卫视.png\" group-title=\"安徽\",安徽卫视")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000001000030159.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"安徽卫视\" tvg-name=\"安徽卫视\" tvg-logo=\"https://epg.v1.mk/logo/安徽卫视.png\" group-title=\"安徽\",安徽卫视-50-FPS")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000001000009954.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"安徽卫视\" tvg-name=\"安徽卫视\" tvg-logo=\"https://epg.v1.mk/logo/安徽卫视.png\" group-title=\"安徽\",安徽卫视-HEVC")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000005000265025.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"东南卫视\" tvg-name=\"东南卫视\" tvg-logo=\"https://epg.v1.mk/logo/东南卫视.png\" group-title=\"卫视\",东南卫视")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000004000010584.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"东南卫视\" tvg-name=\"东南卫视\" tvg-logo=\"https://epg.v1.mk/logo/东南卫视.png\" group-title=\"卫视\",东南卫视-HEVC")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000005000265033.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"甘肃卫视\" tvg-name=\"甘肃卫视\" tvg-logo=\"https://epg.v1.mk/logo/甘肃卫视.png\" group-title=\"甘肃\",甘肃卫视")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000011000031121.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"广东卫视\" tvg-name=\"广东卫视\" tvg-logo=\"https://epg.v1.mk/logo/广东卫视.png\" group-title=\"广东\",广东卫视")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000001000014176.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"广东卫视\" tvg-name=\"广东卫视\" tvg-logo=\"https://epg.v1.mk/logo/广东卫视.png\" group-title=\"广东\",广东卫视-50-FPS")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000001000031076.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"广东卫视\" tvg-name=\"广东卫视\" tvg-logo=\"https://epg.v1.mk/logo/广东卫视.png\" group-title=\"广东\",广东卫视-HEVC")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000005000265034.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"广西卫视\" tvg-name=\"广西卫视\" tvg-logo=\"https://epg.v1.mk/logo/广西卫视.png\" group-title=\"卫视\",广西卫视")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000011000031118.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"贵州卫视\" tvg-name=\"贵州卫视\" tvg-logo=\"https://epg.v1.mk/logo/贵州卫视.png\" group-title=\"贵州\",贵州卫视")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000004000025843.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"海南卫视\" tvg-name=\"海南卫视\" tvg-logo=\"https://epg.v1.mk/logo/海南卫视.png\" group-title=\"海南\",海南卫视")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000004000006211.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"河北卫视\" tvg-name=\"河北卫视\" tvg-logo=\"https://epg.v1.mk/logo/河北卫视.png\" group-title=\"河北\",河北卫视")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000006000040016.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"河南卫视\" tvg-name=\"河南卫视\" tvg-logo=\"https://epg.v1.mk/logo/河南卫视.png\" group-title=\"河南\",河南卫视")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000011000031119.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"黑龙江卫视\" tvg-name=\"黑龙江卫视\" tvg-logo=\"https://epg.v1.mk/logo/黑龙江卫视.png\" group-title=\"黑龙江\",黑龙江卫视")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000001000001925.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"黑龙江卫视\" tvg-name=\"黑龙江卫视\" tvg-logo=\"https://epg.v1.mk/logo/黑龙江卫视.png\" group-title=\"黑龙江\",黑龙江卫视-50-FPS")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000001000016510.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"黑龙江卫视\" tvg-name=\"黑龙江卫视\" tvg-logo=\"https://epg.v1.mk/logo/黑龙江卫视.png\" group-title=\"黑龙江\",黑龙江卫视-HEVC")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000005000265029.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"湖北卫视\" tvg-name=\"湖北卫视\" tvg-logo=\"https://epg.v1.mk/logo/湖北卫视.png\" group-title=\"湖北\",湖北卫视")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000001000024621.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"湖北卫视\" tvg-name=\"湖北卫视\" tvg-logo=\"https://epg.v1.mk/logo/湖北卫视.png\" group-title=\"湖北\",湖北卫视-50-FPS")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000001000015436.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"湖北卫视\" tvg-name=\"湖北卫视\" tvg-logo=\"https://epg.v1.mk/logo/湖北卫视.png\" group-title=\"湖北\",湖北卫视-HEVC")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000005000265023.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"湖南卫视\" tvg-name=\"湖南卫视\" tvg-logo=\"https://epg.v1.mk/logo/湖南卫视.png\" group-title=\"湖南\",湖南卫视")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000004000006692.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"湖南卫视4\" tvg-name=\"湖南卫视4\" tvg-logo=\"https://epg.v1.mk/logo/湖南卫视4.png\" group-title=\"湖南\",湖南卫视-50-FPS")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000001000018044.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"湖南卫视\" tvg-name=\"湖南卫视\" tvg-logo=\"https://epg.v1.mk/logo/湖南卫视.png\" group-title=\"湖南\",湖南卫视-HEVC")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000005000265024.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"湖南金鹰纪实\" tvg-name=\"湖南金鹰纪实\" tvg-logo=\"https://epg.v1.mk/logo/湖南金鹰纪实.png\" group-title=\"湖南\",湖南金鹰纪实")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000011000031203.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"湖南\" tvg-name=\"湖南\" tvg-logo=\"https://epg.v1.mk/logo/湖南.png\" group-title=\"湖南\",湖南快乐垂钓")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000011000031206.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"湖南茶频道\" tvg-name=\"湖南茶频道\" tvg-logo=\"https://epg.v1.mk/logo/湖南茶频道.png\" group-title=\"湖南\",湖南茶频道")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000011000031209.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"吉林卫视\" tvg-name=\"吉林卫视\" tvg-logo=\"https://epg.v1.mk/logo/吉林卫视.png\" group-title=\"吉林\",吉林卫视")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000011000031117.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"江苏卫视\" tvg-name=\"江苏卫视\" tvg-logo=\"https://epg.v1.mk/logo/江苏卫视.png\" group-title=\"江苏\",江苏卫视-50-FPS")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000001000014861.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"江苏卫视\" tvg-name=\"江苏卫视\" tvg-logo=\"https://epg.v1.mk/logo/江苏卫视.png\" group-title=\"江苏\",江苏卫视")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000001000001828.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"江苏卫视\" tvg-name=\"江苏卫视\" tvg-logo=\"https://epg.v1.mk/logo/江苏卫视.png\" group-title=\"江苏\",江苏卫视-HEVC")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000005000265030.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"江西卫视\" tvg-name=\"江西卫视\" tvg-logo=\"https://epg.v1.mk/logo/江西卫视.png\" group-title=\"江西\",江西卫视")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000006000268001.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"江西卫视\" tvg-name=\"江西卫视\" tvg-logo=\"https://epg.v1.mk/logo/江西卫视.png\" group-title=\"江西\",江西卫视-HEVC")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000005000265032.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"辽宁卫视\" tvg-name=\"辽宁卫视\" tvg-logo=\"https://epg.v1.mk/logo/辽宁卫视.png\" group-title=\"辽宁\",辽宁卫视")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000004000011671.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"辽宁卫视\" tvg-name=\"辽宁卫视\" tvg-logo=\"https://epg.v1.mk/logo/辽宁卫视.png\" group-title=\"辽宁\",辽宁卫视-HEVC")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000005000265022.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"青海卫视\" tvg-name=\"青海卫视\" tvg-logo=\"https://epg.v1.mk/logo/青海卫视.png\" group-title=\"青海\",青海卫视")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000002000013359.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"山东卫视\" tvg-name=\"山东卫视\" tvg-logo=\"https://epg.v1.mk/logo/山东卫视.png\" group-title=\"山东\",山东卫视")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000001000016568.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"山东卫视\" tvg-name=\"山东卫视\" tvg-logo=\"https://epg.v1.mk/logo/山东卫视.png\" group-title=\"山东\",山东卫视-50-FPS")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000001000004134.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"山东卫视\" tvg-name=\"山东卫视\" tvg-logo=\"https://epg.v1.mk/logo/山东卫视.png\" group-title=\"山东\",山东卫视-HEVC")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000005000265019.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"上海东方影视\" tvg-name=\"上海东方影视\" tvg-logo=\"https://epg.v1.mk/logo/上海东方影视.png\" group-title=\"上海\",上海东方卫视")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000001000003639.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"上海东方影视\" tvg-name=\"上海东方影视\" tvg-logo=\"https://epg.v1.mk/logo/上海东方影视.png\" group-title=\"上海\",上海东方卫视-50-FPS")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000004000014098.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"上海东方影视\" tvg-name=\"上海东方影视\" tvg-logo=\"https://epg.v1.mk/logo/上海东方影视.png\" group-title=\"上海\",上海东方卫视-HEVC")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000005000265018.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"上海ICS\" tvg-name=\"上海ICS\" tvg-logo=\"https://epg.v1.mk/logo/上海ICS.png\" group-title=\"上海\",上海-ICS-外语")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000010000030951.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"上海第一财经\" tvg-name=\"上海第一财经\" tvg-logo=\"https://epg.v1.mk/logo/上海第一财经.png\" group-title=\"上海\",上海第一财经")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000010000027146.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"上海东方影视\" tvg-name=\"上海东方影视\" tvg-logo=\"https://epg.v1.mk/logo/上海东方影视.png\" group-title=\"上海\",上海东方财经")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000007000010003.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"上海东方影视\" tvg-name=\"上海东方影视\" tvg-logo=\"https://epg.v1.mk/logo/上海东方影视.png\" group-title=\"上海\",上海东方影视")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000010000032212.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"上海都市\" tvg-name=\"上海都市\" tvg-logo=\"https://epg.v1.mk/logo/上海都市.png\" group-title=\"上海\",上海都市")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000010000018926.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"上海ICS\" tvg-name=\"上海ICS\" tvg-logo=\"https://epg.v1.mk/logo/上海ICS.png\" group-title=\"上海\",上海法治天地")
fmt.Fprintln(w, "http://"+hostname+"/itv/2000000002000000014.m3u8?cdn=hnbblive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"上海ICS\" tvg-name=\"上海ICS\" tvg-logo=\"https://epg.v1.mk/logo/上海ICS.png\" group-title=\"上海\",上海哈哈炫动")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000011000031123.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"上海纪实人文\" tvg-name=\"上海纪实人文\" tvg-logo=\"https://epg.v1.mk/logo/上海纪实人文.png\" group-title=\"上海\",上海纪实人文-50-FPS")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000004000010282.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"上海纪实人文\" tvg-name=\"上海纪实人文\" tvg-logo=\"https://epg.v1.mk/logo/上海纪实人文.png\" group-title=\"上海\",上海纪实人文-HEVC")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000005000265021.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"上海五星体育\" tvg-name=\"上海五星体育\" tvg-logo=\"https://epg.v1.mk/logo/上海五星体育.png\" group-title=\"上海\",上海五星体育")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000010000017540.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"上海新闻综合\" tvg-name=\"上海新闻综合\" tvg-logo=\"https://epg.v1.mk/logo/上海新闻综合.png\" group-title=\"上海\",上海新闻综合")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000011000031110.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"深圳卫视\" tvg-name=\"深圳卫视\" tvg-logo=\"https://epg.v1.mk/logo/深圳卫视.png\" group-title=\"卫视\",深圳卫视")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000004000007410.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"深圳卫视\" tvg-name=\"深圳卫视\" tvg-logo=\"https://epg.v1.mk/logo/深圳卫视.png\" group-title=\"卫视\",深圳卫视-50-FPS")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000001000002116.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"深圳卫视\" tvg-name=\"深圳卫视\" tvg-logo=\"https://epg.v1.mk/logo/深圳卫视.png\" group-title=\"卫视\",深圳卫视-HEVC")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000005000265028.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"四川卫视\" tvg-name=\"四川卫视\" tvg-logo=\"https://epg.v1.mk/logo/四川卫视.png\" group-title=\"四川\",四川卫视")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000004000006119.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"天津卫视\" tvg-name=\"天津卫视\" tvg-logo=\"https://epg.v1.mk/logo/天津卫视.png\" group-title=\"卫视\",天津卫视")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000004000006827.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"天津卫视\" tvg-name=\"天津卫视\" tvg-logo=\"https://epg.v1.mk/logo/天津卫视.png\" group-title=\"卫视\",天津卫视-50-FPS")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000001000009186.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"天津卫视\" tvg-name=\"天津卫视\" tvg-logo=\"https://epg.v1.mk/logo/天津卫视.png\" group-title=\"卫视\",天津卫视-HEVC")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000005000265026.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"云南卫视\" tvg-name=\"云南卫视\" tvg-logo=\"https://epg.v1.mk/logo/云南卫视.png\" group-title=\"云南\",云南卫视")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000011000031120.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"浙江卫视\" tvg-name=\"浙江卫视\" tvg-logo=\"https://epg.v1.mk/logo/浙江卫视.png\" group-title=\"浙江\",浙江卫视-50-FPS")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000004000007275.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"浙江卫视\" tvg-name=\"浙江卫视\" tvg-logo=\"https://epg.v1.mk/logo/浙江卫视.png\" group-title=\"浙江\",浙江卫视")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000001000014260.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"浙江卫视\" tvg-name=\"浙江卫视\" tvg-logo=\"https://epg.v1.mk/logo/浙江卫视.png\" group-title=\"浙江\",浙江卫视-HEVC")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000005000265031.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"重庆卫视\" tvg-name=\"重庆卫视\" tvg-logo=\"https://epg.v1.mk/logo/重庆卫视.png\" group-title=\"重庆\",重庆卫视")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000001000001096.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"重庆卫视\" tvg-name=\"重庆卫视\" tvg-logo=\"https://epg.v1.mk/logo/重庆卫视.png\" group-title=\"重庆\",重庆卫视-HEVC")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000005000265017.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"华数4K\" tvg-name=\"华数4K\" tvg-logo=\"https://epg.v1.mk/logo/华数4K.png\" group-title=\"4K频道\",华数-4K")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000003000004748.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"纯享4K\" tvg-name=\"纯享4K\" tvg-logo=\"https://epg.v1.mk/logo/纯享4K.png\" group-title=\"4K频道\",纯享-4K")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000004000011651.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"咪咕4K\" tvg-name=\"咪咕4K\" tvg-logo=\"https://epg.v1.mk/logo/咪咕4K.png\" group-title=\"4K频道\",咪咕4K-1")
fmt.Fprintln(w, "http://"+hostname+"/itv/3000000010000005180.m3u8?cdn=FifastbLive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"咪咕4K\" tvg-name=\"咪咕4K\" tvg-logo=\"https://epg.v1.mk/logo/咪咕4K.png\" group-title=\"4K频道\",咪咕4K-2")
fmt.Fprintln(w, "http://"+hostname+"/itv/3000000010000015686.m3u8?cdn=FifastbLive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"咪咕4k\" tvg-name=\"咪咕4k\" tvg-logo=\"https://epg.v1.mk/logo/咪咕4k.png\" group-title=\"其他\",咪咕全民热练")
fmt.Fprintln(w, "http://"+hostname+"/itv/3000000020000031315.m3u8?cdn=FifastbLive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"求索动物\" tvg-name=\"求索动物\" tvg-logo=\"https://epg.v1.mk/logo/求索动物.png\" group-title=\"其他\",求索动物")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000002000010046.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"求索纪录\" tvg-name=\"求索纪录\" tvg-logo=\"https://epg.v1.mk/logo/求索纪录.png\" group-title=\"其他\",求索纪录")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000002000032052.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"求索科学\" tvg-name=\"求索科学\" tvg-logo=\"https://epg.v1.mk/logo/求索科学.png\" group-title=\"其他\",求索科学")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000002000032344.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"求索生活\" tvg-name=\"求索生活\" tvg-logo=\"https://epg.v1.mk/logo/求索生活.png\" group-title=\"其他\",求索生活")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000002000003382.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"NewTV精品综合\" tvg-name=\"NewTV精品综合\" tvg-logo=\"https://epg.v1.mk/logo/NewTV精品综合.png\" group-title=\"NEWTV\",NewTV-精品综合")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000004000019008.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"newtv精品大剧\" tvg-name=\"newtv精品大剧\" tvg-logo=\"https://epg.v1.mk/logo/newtv精品大剧.png\" group-title=\"NEWTV\",NewTV-精品大剧")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000004000013968.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"newtv精品纪录\" tvg-name=\"newtv精品纪录\" tvg-logo=\"https://epg.v1.mk/logo/newtv精品纪录.png\" group-title=\"NEWTV\",NewTV-精品纪录")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000004000013730.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"newtv精品体育\" tvg-name=\"newtv精品体育\" tvg-logo=\"https://epg.v1.mk/logo/newtv精品体育.png\" group-title=\"NEWTV\",NewTV-精品体育")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000004000014634.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"NEWTV精品萌宠\" tvg-name=\"NEWTV精品萌宠\" tvg-logo=\"https://epg.v1.mk/logo/NEWTV精品萌宠.png\" group-title=\"NEWTV\",NewTV-精品萌宠")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000006000032328.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"newtv爱情喜剧\" tvg-name=\"newtv爱情喜剧\" tvg-logo=\"https://epg.v1.mk/logo/newtv爱情喜剧.png\" group-title=\"NEWTV\",NewTV-爱情喜剧")
fmt.Fprintln(w, "http://"+hostname+"/itv/2000000003000000010.m3u8?cdn=hnbblive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"newtv超级电视剧\" tvg-name=\"newtv超级电视剧\" tvg-logo=\"https://epg.v1.mk/logo/newtv超级电视剧.png\" group-title=\"NEWTV\",NewTV-超级电视剧")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000006000268003.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"newtv超级电影\" tvg-name=\"newtv超级电影\" tvg-logo=\"https://epg.v1.mk/logo/newtv超级电影.png\" group-title=\"NEWTV\",NewTV-超级电影")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000003000012426.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"newtv超级体育\" tvg-name=\"newtv超级体育\" tvg-logo=\"https://epg.v1.mk/logo/newtv超级体育.png\" group-title=\"NEWTV\",NewTV-超级体育")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000001000009601.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"newtv超级综艺\" tvg-name=\"newtv超级综艺\" tvg-logo=\"https://epg.v1.mk/logo/newtv超级综艺.png\" group-title=\"NEWTV\",NewTV-超级综艺")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000006000268002.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"newtv潮妈辣婆\" tvg-name=\"newtv潮妈辣婆\" tvg-logo=\"https://epg.v1.mk/logo/newtv潮妈辣婆.png\" group-title=\"NEWTV\",NewTV-潮妈辣婆")
fmt.Fprintln(w, "http://"+hostname+"/itv/2000000003000000018.m3u8?cdn=hnbblive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"NewTV东北热剧\" tvg-name=\"NewTV东北热剧\" tvg-logo=\"https://epg.v1.mk/logo/NewTV东北热剧.png\" group-title=\"NEWTV\",NewTV-东北热剧")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000005000266013.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"newtv动作电影\" tvg-name=\"newtv动作电影\" tvg-logo=\"https://epg.v1.mk/logo/newtv动作电影.png\" group-title=\"NEWTV\",NewTV-动作电影")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000004000018653.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"NewTV古装剧场\" tvg-name=\"NewTV古装剧场\" tvg-logo=\"https://epg.v1.mk/logo/NewTV古装剧场.png\" group-title=\"NEWTV\",NewTV-古装剧场")
fmt.Fprintln(w, "http://"+hostname+"/itv/2000000003000000024.m3u8?cdn=hnbblive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"NewTV欢乐剧场\" tvg-name=\"NewTV欢乐剧场\" tvg-logo=\"https://epg.v1.mk/logo/NewTV欢乐剧场.png\" group-title=\"NEWTV\",NewTV-欢乐剧场")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000005000266012.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"newtv家庭剧场\" tvg-name=\"newtv家庭剧场\" tvg-logo=\"https://epg.v1.mk/logo/newtv家庭剧场.png\" group-title=\"NEWTV\",NewTV-家庭剧场")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000004000008284.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"NewTV金牌综艺\" tvg-name=\"NewTV金牌综艺\" tvg-logo=\"https://epg.v1.mk/logo/NewTV金牌综艺.png\" group-title=\"NEWTV\",NewTV-金牌综艺")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000004000026167.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"newtv惊悚悬疑\" tvg-name=\"newtv惊悚悬疑\" tvg-logo=\"https://epg.v1.mk/logo/newtv惊悚悬疑.png\" group-title=\"NEWTV\",NewTV-惊悚悬疑")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000004000024282.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"newtv军旅剧场\" tvg-name=\"newtv军旅剧场\" tvg-logo=\"https://epg.v1.mk/logo/newtv军旅剧场.png\" group-title=\"NEWTV\",NewTV-军旅剧场")
fmt.Fprintln(w, "http://"+hostname+"/itv/2000000003000000014.m3u8?cdn=hnbblive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"newtv军事评论\" tvg-name=\"newtv军事评论\" tvg-logo=\"https://epg.v1.mk/logo/newtv军事评论.png\" group-title=\"NEWTV\",NewTV-军事评论")
fmt.Fprintln(w, "http://"+hostname+"/itv/2000000003000000022.m3u8?cdn=hnbblive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"NewTV魅力潇湘\" tvg-name=\"NewTV魅力潇湘\" tvg-logo=\"https://epg.v1.mk/logo/NewTV魅力潇湘.png\" group-title=\"NEWTV\",NewTV-魅力潇湘")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000001000006197.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"NewTV明星大片\" tvg-name=\"NewTV明星大片\" tvg-logo=\"https://epg.v1.mk/logo/NewTV明星大片.png\" group-title=\"NEWTV\",NewTV-明星大片")
fmt.Fprintln(w, "http://"+hostname+"/itv/2000000003000000016.m3u8?cdn=hnbblive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"newtv农业致富\" tvg-name=\"newtv农业致富\" tvg-logo=\"https://epg.v1.mk/logo/newtv农业致富.png\" group-title=\"NEWTV\",NewTV-农业致富")
fmt.Fprintln(w, "http://"+hostname+"/itv/2000000003000000003.m3u8?cdn=hnbblive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"NEWTV武博世界\" tvg-name=\"NEWTV武博世界\" tvg-logo=\"https://epg.v1.mk/logo/NEWTV武博世界.png\" group-title=\"NEWTV\",NewTV-武博世界")
fmt.Fprintln(w, "http://"+hostname+"/itv/2000000003000000007.m3u8?cdn=hnbblive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"newtv炫舞未来\" tvg-name=\"newtv炫舞未来\" tvg-logo=\"https://epg.v1.mk/logo/newtv炫舞未来.png\" group-title=\"NEWTV\",NewTV-炫舞未来")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000001000000515.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"newtv怡伴健康\" tvg-name=\"newtv怡伴健康\" tvg-logo=\"https://epg.v1.mk/logo/newtv怡伴健康.png\" group-title=\"NEWTV\",NewTV-怡伴健康")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000005000266011.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"newtv中国功夫\" tvg-name=\"newtv中国功夫\" tvg-logo=\"https://epg.v1.mk/logo/newtv中国功夫.png\" group-title=\"NEWTV\",NewTV-中国功夫")
fmt.Fprintln(w, "http://"+hostname+"/itv/2000000003000000009.m3u8?cdn=hnbblive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"NEWTV黑莓电影\" tvg-name=\"NEWTV黑莓电影\" tvg-logo=\"https://epg.v1.mk/logo/NEWTV黑莓电影.png\" group-title=\"NEWTV\",NewTV-黑莓电影")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000004000019624.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"NEWTV黑莓动画\" tvg-name=\"NEWTV黑莓动画\" tvg-logo=\"https://epg.v1.mk/logo/NEWTV黑莓动画.png\" group-title=\"NEWTV\",NewTV-黑莓动画")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000004000021734.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"NEWTVCJDY\" tvg-name=\"NEWTVCJDY\" tvg-logo=\"https://epg.v1.mk/logo/NEWTVCJDY.png\" group-title=\"NEWTV\",NewTV-哒啵电竞")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000006000032327.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"NEWTVCJDY\" tvg-name=\"NEWTVCJDY\" tvg-logo=\"https://epg.v1.mk/logo/NEWTVCJDY.png\" group-title=\"NEWTV\",NewTV-哒啵赛事")
fmt.Fprintln(w, "http://"+hostname+"/itv/1000000001000003775.m3u8?cdn=ystenlive")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"SITV\" tvg-name=\"SITV\" tvg-logo=\"https://epg.v1.mk/logo/SITV.png\" group-title=\"其他\",SiTV-动漫秀场")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000011000031113.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"SITV都市剧场\" tvg-name=\"SITV都市剧场\" tvg-logo=\"https://epg.v1.mk/logo/SITV都市剧场.png\" group-title=\"其他\",SiTV-都市剧场")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000011000031111.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"SITV法治天地\" tvg-name=\"SITV法治天地\" tvg-logo=\"https://epg.v1.mk/logo/SITV法治天地.png\" group-title=\"其他\",SiTV-法治天地")
fmt.Fprintln(w, "http://"+hostname+"/itv/9001547084732463424.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"SITV欢笑剧场\" tvg-name=\"SITV欢笑剧场\" tvg-logo=\"https://epg.v1.mk/logo/SITV欢笑剧场.png\" group-title=\"其他\",SiTV-欢笑剧场")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000002000009455.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"SITV欢笑剧场\" tvg-name=\"SITV欢笑剧场\" tvg-logo=\"https://epg.v1.mk/logo/SITV欢笑剧场.png\" group-title=\"其他\",SiTV-欢笑剧场-4K")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000007000010001.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"SITV金色学堂\" tvg-name=\"SITV金色学堂\" tvg-logo=\"https://epg.v1.mk/logo/SITV金色学堂.png\" group-title=\"其他\",SiTV-金色学堂")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000010000026105.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"SITV劲爆体育\" tvg-name=\"SITV劲爆体育\" tvg-logo=\"https://epg.v1.mk/logo/SITV劲爆体育.png\" group-title=\"其他\",SiTV-劲爆体育")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000002000029972.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"SITV乐游\" tvg-name=\"SITV乐游\" tvg-logo=\"https://epg.v1.mk/logo/SITV乐游.png\" group-title=\"其他\",SiTV-乐游")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000011000031112.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"SITV\" tvg-name=\"SITV\" tvg-logo=\"https://epg.v1.mk/logo/SITV.png\" group-title=\"其他\",SiTV-魅力足球")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000011000031207.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"SITV七彩戏剧\" tvg-name=\"SITV七彩戏剧\" tvg-logo=\"https://epg.v1.mk/logo/SITV七彩戏剧.png\" group-title=\"其他\",SiTV-七彩戏剧")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000011000031116.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"SITV\" tvg-name=\"SITV\" tvg-logo=\"https://epg.v1.mk/logo/SITV.png\" group-title=\"其他\",SiTV-生活时尚")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000002000019634.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"SITV\" tvg-name=\"SITV\" tvg-logo=\"https://epg.v1.mk/logo/SITV.png\" group-title=\"其他\",SiTV-游戏风云")
fmt.Fprintln(w, "http://"+hostname+"/itv/5000000011000031114.m3u8?cdn=bestzb")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"IHOT爱电竞\" tvg-name=\"IHOT爱电竞\" tvg-logo=\"https://epg.v1.mk/logo/IHOT爱电竞.png\" group-title=\"IHOT\",iHOT-爱电竞")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000006000230630.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"IHOT爱谍战\" tvg-name=\"IHOT爱谍战\" tvg-logo=\"https://epg.v1.mk/logo/IHOT爱谍战.png\" group-title=\"IHOT\",iHOT-爱谍战")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000006000070630.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"IHOT爱动漫\" tvg-name=\"IHOT爱动漫\" tvg-logo=\"https://epg.v1.mk/logo/IHOT爱动漫.png\" group-title=\"IHOT\",iHOT-爱动漫")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000006000280630.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"IHOT爱都市\" tvg-name=\"IHOT爱都市\" tvg-logo=\"https://epg.v1.mk/logo/IHOT爱都市.png\" group-title=\"IHOT\",iHOT-爱都市")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000006000080630.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"IHOT爱怀旧\" tvg-name=\"IHOT爱怀旧\" tvg-logo=\"https://epg.v1.mk/logo/IHOT爱怀旧.png\" group-title=\"IHOT\",iHOT-爱怀旧")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000006000260630.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"IHOT爱经典\" tvg-name=\"IHOT爱经典\" tvg-logo=\"https://epg.v1.mk/logo/IHOT爱经典.png\" group-title=\"IHOT\",iHOT-爱经典")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000006000060630.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"IHOT爱科幻\" tvg-name=\"IHOT爱科幻\" tvg-logo=\"https://epg.v1.mk/logo/IHOT爱科幻.png\" group-title=\"IHOT\",iHOT-爱科幻")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000006000020630.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"IHOT爱科学\" tvg-name=\"IHOT爱科学\" tvg-logo=\"https://epg.v1.mk/logo/IHOT爱科学.png\" group-title=\"IHOT\",iHOT-爱科学")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000006000160630.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"IHOT爱浪漫\" tvg-name=\"IHOT爱浪漫\" tvg-logo=\"https://epg.v1.mk/logo/IHOT爱浪漫.png\" group-title=\"IHOT\",iHOT-爱浪漫")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000006000040630.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"IHOT爱历史\" tvg-name=\"IHOT爱历史\" tvg-logo=\"https://epg.v1.mk/logo/IHOT爱历史.png\" group-title=\"IHOT\",iHOT-爱历史")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000006000150630.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"IHOT爱旅行\" tvg-name=\"IHOT爱旅行\" tvg-logo=\"https://epg.v1.mk/logo/IHOT爱旅行.png\" group-title=\"IHOT\",iHOT-爱旅行")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000006000250630.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"IHOT爱奇谈\" tvg-name=\"IHOT爱奇谈\" tvg-logo=\"https://epg.v1.mk/logo/IHOT爱奇谈.png\" group-title=\"IHOT\",iHOT-爱奇谈")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000006000270630.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"IHOT爱青春\" tvg-name=\"IHOT爱青春\" tvg-logo=\"https://epg.v1.mk/logo/IHOT爱青春.png\" group-title=\"IHOT\",iHOT-爱青春")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000006000100630.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"IHOT爱赛车\" tvg-name=\"IHOT爱赛车\" tvg-logo=\"https://epg.v1.mk/logo/IHOT爱赛车.png\" group-title=\"IHOT\",iHOT-爱赛车")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000006000240630.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"IHOT爱体育\" tvg-name=\"IHOT爱体育\" tvg-logo=\"https://epg.v1.mk/logo/IHOT爱体育.png\" group-title=\"IHOT\",iHOT-爱体育")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000006000290630.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"IHOT爱玩具\" tvg-name=\"IHOT爱玩具\" tvg-logo=\"https://epg.v1.mk/logo/IHOT爱玩具.png\" group-title=\"IHOT\",iHOT-爱玩具")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000006000220630.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"IHOT爱喜剧\" tvg-name=\"IHOT爱喜剧\" tvg-logo=\"https://epg.v1.mk/logo/IHOT爱喜剧.png\" group-title=\"IHOT\",iHOT-爱喜剧")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000006000010630.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"IHOT爱悬疑\" tvg-name=\"IHOT爱悬疑\" tvg-logo=\"https://epg.v1.mk/logo/IHOT爱悬疑.png\" group-title=\"IHOT\",iHOT-爱悬疑")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000006000050630.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"IHOT爱幼教\" tvg-name=\"IHOT爱幼教\" tvg-logo=\"https://epg.v1.mk/logo/IHOT爱幼教.png\" group-title=\"IHOT\",iHOT-爱幼教")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000006000180630.m3u8?cdn=wasusyt")
fmt.Fprintln(w, "#EXTINF:-1,tvg-id=\"IHOT爱院线\" tvg-name=\"IHOT爱院线\" tvg-logo=\"https://epg.v1.mk/logo/IHOT爱院线.png\" group-title=\"IHOT\",iHOT-爱院线")
fmt.Fprintln(w, "http://"+hostname+"/itv/6000000006000030630.m3u8?cdn=wasusyt")
}
================================================
FILE: list/yylunbo.go
================================================
// Package list
// @Time:2023/06/03 20:35
// @File:yylunbo.go
// @SoftWare:Goland
// @Author:feiyang
// @Contact:TG@feiyangdigital
package list
import (
"io"
"net/http"
)
type Yylist struct {
}
type DataElement struct {
Avatar string `json:"avatar"`
Biz string `json:"biz"`
Desc string `json:"desc"`
Sid int `json:"sid"`
}
type ApiResponse struct {
Data struct {
IsLastPage int `json:"isLastPage"`
Data []DataElement `json:"data"`
} `json:"data"`
}
func (y *Yylist) Yylb(requesturl string) string {
client := &http.Client{}
req, _ := http.NewRequest("GET", requesturl, nil)
req.Header.Set("Upgrade-Insecure-Requests", "1")
req.Header.Set("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36")
res, err := client.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
return string(body)
}
================================================
FILE: liveurls/bilibili.go
================================================
// Package liveurls
// @Time:2023/02/10 01:03
// @File:bilibili.go
// @SoftWare:Goland
// @Author:feiyang
// @Contact:TG@feiyangdigital
package liveurls
import (
"encoding/json"
"fmt"
"github.com/tidwall/gjson"
"io"
"net/http"
)
type BiliBili struct {
Rid string
Line string
Quality string
Platform string
}
func (b *BiliBili) GetRealRoomID() any {
var firstmap = make(map[string]any)
var realroomid string
apiurl := "https://api.live.bilibili.com/room/v1/Room/room_init?id=" + b.Rid
client := &http.Client{}
r, _ := http.NewRequest("GET", apiurl, nil)
r.Header.Add("user-agent", "Mozilla/5.0 (iPhone; CPU iPhone OS 16_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.3 Mobile/15E148 Safari/604.1")
resp, _ := client.Do(r)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
json.Unmarshal(body, &firstmap)
if firstmap["msg"] == "直播间不存在" {
return nil
}
if newmap, ok := firstmap["data"].(map[string]any); ok {
if newmap["live_status"] != float64(1) {
return nil
} else {
if flt, ok := newmap["room_id"].(float64); ok {
realroomid = fmt.Sprintf("%v", int(flt))
}
}
}
return realroomid
}
func (b *BiliBili) GetPlayUrl() any {
var roomid string
var realurl string
if str, ok := b.GetRealRoomID().(string); ok {
roomid = str
} else {
return nil
}
client := &http.Client{}
params := map[string]string{
"room_id": roomid,
"protocol": "0,1",
"format": "0,1,2",
"codec": "0,1",
"qn": b.Quality,
"platform": b.Platform,
"ptype": "8",
}
r, _ := http.NewRequest("GET", "https://api.live.bilibili.com/xlive/web-room/v2/index/getRoomPlayInfo", nil)
q := r.URL.Query()
for k, v := range params {
q.Add(k, v)
}
r.URL.RawQuery = q.Encode()
resp, _ := client.Do(r)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
var json = string(body)
value := gjson.Get(json, "data.playurl_info.playurl.stream")
value.ForEach(func(key, value gjson.Result) bool {
newvalue := gjson.Get(value.String(), "format.0.format_name")
if newvalue.String() == "ts" {
nnvalue := gjson.Get(value.String(), "format.#")
valuelast := fmt.Sprintf("%v", nnvalue.Int()-1)
codeclen := gjson.Get(value.String(), "format."+valuelast+".codec.#")
codeclast := fmt.Sprintf("%v", codeclen.Int()-1)
base_url := gjson.Get(value.String(), "format."+valuelast+".codec."+codeclast+".base_url")
url_info := gjson.Get(value.String(), "format."+valuelast+".codec."+codeclast+".url_info")
url_info.ForEach(func(key, value gjson.Result) bool {
keyval := fmt.Sprintf("%v", key)
switch b.Line {
case "first":
if keyval == "0" {
host := gjson.Get(value.String(), "host")
extra := gjson.Get(value.String(), "extra")
realurl = fmt.Sprintf("%v%v%v", host, base_url, extra)
}
case "second":
if keyval == "1" {
host := gjson.Get(value.String(), "host")
extra := gjson.Get(value.String(), "extra")
realurl = fmt.Sprintf("%v%v%v", host, base_url, extra)
}
case "third":
if keyval == "2" {
host := gjson.Get(value.String(), "host")
extra := gjson.Get(value.String(), "extra")
realurl = fmt.Sprintf("%v%v%v", host, base_url, extra)
}
}
return true
})
}
return true
})
return realurl
}
================================================
FILE: liveurls/douyin.go
================================================
// Package liveurls
// @Time:2023/02/03 01:59
// @File:douyin.go
// @SoftWare:Goland
// @Author:feiyang
// @Contact:TG@feiyangdigital
package liveurls
import (
"fmt"
"github.com/tidwall/gjson"
"io"
"net/http"
"regexp"
"strconv"
)
type Douyin struct {
Stream string
Rid string
}
func (d *Douyin) GetDouYinUrl() any {
liveurl := "https://live.douyin.com/" + d.Rid
client := &http.Client{}
re, _ := http.NewRequest("GET", liveurl, nil)
re.Header.Add("user-agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36")
re.Header.Add("upgrade-insecure-requests", "1")
oresp, _ := client.Do(re)
defer oresp.Body.Close()
oreg := regexp.MustCompile(`(?i)__ac_nonce=(.*?);`)
ores := oreg.FindStringSubmatch(oresp.Header["Set-Cookie"][0])
r, _ := http.NewRequest("GET", liveurl, nil)
cookie := &http.Cookie{Name: "__ac_nonce", Value: ores[1]}
r.AddCookie(cookie)
r.Header.Add("user-agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36")
r.Header.Add("upgrade-insecure-requests", "1")
resp, _ := client.Do(r)
defer resp.Body.Close()
reg := regexp.MustCompile(`(?i)ttwid=.*?;`)
res := reg.FindStringSubmatch(fmt.Sprintf("%s", resp.Cookies()))[0]
url := "https://live.douyin.com/webcast/room/web/enter/?aid=6383&app_name=douyin_web&live_id=1&device_platform=web&language=zh-CN&enter_from=web_live&cookie_enabled=true&screen_width=1728&screen_height=1117&browser_language=zh-CN&browser_platform=MacIntel&browser_name=Chrome&browser_version=116.0.0.0&web_rid=" + d.Rid
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("User-Agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36")
req.Header.Add("Cookie", res)
req.Header.Add("Accept", "*/*")
req.Header.Add("Host", "live.douyin.com")
req.Header.Add("Connection", "keep-alive")
ress, _ := client.Do(req)
defer ress.Body.Close()
body, _ := io.ReadAll(ress.Body)
var json = string(body)
status, _ := strconv.Atoi(fmt.Sprintf("%s", gjson.Get(json, "data.data.0.status")))
if status != 2 {
return nil
}
var realurl string
value := gjson.Get(json, "data.data.0.stream_url.live_core_sdk_data.pull_data.stream_data")
value.ForEach(func(key, value gjson.Result) bool {
if gjson.Get(value.String(), "data.origin").Exists() {
switch d.Stream {
case "flv":
realurl = fmt.Sprintf("%s", gjson.Get(value.String(), "data.origin.main.flv"))
case "hls":
realurl = fmt.Sprintf("%s", gjson.Get(value.String(), "data.origin.main.hls"))
}
}
return true
})
return realurl
}
================================================
FILE: liveurls/douyu.go
================================================
// Package liveurls
// @Time:2023/02/05 06:36
// @File:douyu.go
// @SoftWare:Goland
// @Author:feiyang
// @Contact:TG@feiyangdigital
package liveurls
import (
"Golang/utils"
"crypto/md5"
"encoding/json"
"fmt"
"io"
"net/http"
"regexp"
"strings"
"time"
)
type Douyu struct {
Rid string
Stream_type string
}
func md5V3(str string) string {
w := md5.New()
io.WriteString(w, str)
md5str := fmt.Sprintf("%x", w.Sum(nil))
return md5str
}
func (d *Douyu) GetRoomId() any {
liveurl := "https://m.douyu.com/" + d.Rid
client := &http.Client{}
r, _ := http.NewRequest("GET", liveurl, nil)
r.Header.Add("user-agent", "Mozilla/5.0 (iPhone; CPU iPhone OS 16_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.3 Mobile/15E148 Safari/604.1")
r.Header.Add("upgrade-insecure-requests", "1")
resp, _ := client.Do(r)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
roomidreg := regexp.MustCompile(`(?i)rid":(\d{1,8}),"vipId`)
roomidres := roomidreg.FindStringSubmatch(string(body))
if roomidres == nil {
return nil
}
realroomid := roomidres[1]
return realroomid
}
func (d *Douyu) GetRealUrl() any {
var jsUtil = &utils.JsUtil{}
did := "10000000000000000000000000001501"
var timestamp = time.Now().Unix()
var realroomid string
rid := d.GetRoomId()
if str, ok := rid.(string); ok {
realroomid = str
} else {
return nil
}
liveurl := "https://www.douyu.com/" + realroomid
client := &http.Client{}
r, _ := http.NewRequest("GET", liveurl, nil)
r.Header.Add("user-agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36")
r.Header.Add("upgrade-insecure-requests", "1")
resp, _ := client.Do(r)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
reg := regexp.MustCompile(`(?i)(vdwdae325w_64we[\s\S]*function ub98484234[\s\S]*?)function`)
res := reg.FindStringSubmatch(string(body))
nreg := regexp.MustCompile(`(?i)eval.*?;}`)
strfn := nreg.ReplaceAllString(res[1], "strc;}")
var funcContent1 []string
funcContent1 = append(append(funcContent1, strfn), "ub98484234")
result := jsUtil.JsRun(funcContent1, "ub98484234")
nres := fmt.Sprintf("%s", result)
nnreg := regexp.MustCompile(`(?i)v=(\d+)`)
nnres := nnreg.FindStringSubmatch(nres)
unrb := fmt.Sprintf("%v%v%v%v", realroomid, did, timestamp, nnres[1])
rb := md5V3(unrb)
nnnreg := regexp.MustCompile(`(?i)return rt;}\);?`)
strfn2 := nnnreg.ReplaceAllString(nres, "return rt;}")
strfn3 := strings.Replace(strfn2, `(function (`, `function sign(`, -1)
strfn4 := strings.Replace(strfn3, `CryptoJS.MD5(cb).toString()`, `"`+rb+`"`, -1)
var funcContent2 []string
funcContent2 = append(append(funcContent2, strfn4), "sign")
result2 := jsUtil.JsRun(funcContent2, realroomid, did, timestamp)
param := fmt.Sprintf("%s", result2)
realparam := param + "&rate=0"
r1, n4err := http.Post("https://www.douyu.com/lapi/live/getH5Play/"+realroomid, "application/x-www-form-urlencoded", strings.NewReader(realparam))
if n4err != nil {
return nil
}
defer r1.Body.Close()
body1, _ := io.ReadAll(r1.Body)
var s1 map[string]any
json.Unmarshal(body1, &s1)
var flv_url string
var rtmp_url string
var rtmp_live string
for k, v := range s1 {
if k == "error" {
if s1[k] != float64(0) {
return nil
}
}
if v, ok := v.(map[string]any); ok {
for k, v := range v {
if k == "rtmp_url" {
if urlstr, ok := v.(string); ok {
rtmp_url = urlstr
}
} else if k == "rtmp_live" {
if urlstr, ok := v.(string); ok {
rtmp_live = urlstr
}
}
}
}
}
flv_url = rtmp_url + "/" + rtmp_live
n4reg := regexp.MustCompile(`(?i)(\d{1,8}[0-9a-zA-Z]+)_?\d{0,4}(.flv|/playlist)`)
houzhui := n4reg.FindStringSubmatch(flv_url)
var real_url string
switch d.Stream_type {
case "hls":
real_url = strings.Replace(flv_url, houzhui[1]+".flv", houzhui[1]+".m3u8", -1)
case "flv":
real_url = flv_url
case "xs":
real_url = strings.Replace(flv_url, houzhui[1]+".flv", houzhui[1]+".xs", -1)
}
return real_url
}
================================================
FILE: liveurls/huya.go
================================================
// Package liveurls
// @Time:2023/02/05 23:34
// @File:huya.go
// @SoftWare:Goland
// @Author:feiyang
// @Contact:TG@feiyangdigital
package liveurls
import (
"bytes"
"crypto/md5"
"encoding/base64"
"encoding/hex"
"encoding/json"
"fmt"
"io"
"math/rand"
"net/http"
"net/url"
"regexp"
"strconv"
"strings"
"time"
"github.com/tidwall/gjson"
)
type Huya struct {
Rid string
Media string
Type string
Cdn string
}
type Data struct {
}
type Payload struct {
AppId int `json:"appId"`
ByPass int `json:"byPass"`
Context string `json:"context"`
Version string `json:"version"`
Data Data `json:"data"`
}
type ResponseData struct {
Data struct {
Uid string `json:"uid"`
} `json:"data"`
}
func getContent(apiUrl string) ([]byte, error) {
payload := Payload{
AppId: 5002,
ByPass: 3,
Context: "",
Version: "2.4",
Data: Data{},
}
jsonPayload, err := json.Marshal(payload)
if err != nil {
return nil, err
}
req, err := http.NewRequest("POST", apiUrl, bytes.NewBuffer(jsonPayload))
if err != nil {
return nil, err
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Content-Length", fmt.Sprintf("%d", len(jsonPayload)))
req.Header.Set("upgrade-insecure-requests", "1")
req.Header.Set("user-agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
return nil, err
}
defer resp.Body.Close()
return io.ReadAll(resp.Body)
}
var streamInfo = map[string]any{"flv": make(map[string]string), "hls": make(map[string]string)}
func getUid() string {
content, _ := getContent("https://udblgn.huya.com/web/anonymousLogin")
var responseData ResponseData
json.Unmarshal(content, &responseData)
uid := responseData.Data.Uid
return uid
}
var uid, _ = strconv.Atoi(getUid())
func getUUID() int64 {
now := time.Now().UnixNano() / int64(time.Millisecond)
randNum := rand.Intn(1000)
return ((now % 10000000000 * 1000) + int64(randNum)) % 4294967295
}
func processAntiCode(antiCode string, uid int, streamName string) string {
TimeLocation, err := time.LoadLocation("Asia/Shanghai")
if err != nil {
TimeLocation = time.FixedZone("CST", 8*60*60)
}
now := time.Now().In(TimeLocation)
q, _ := url.ParseQuery(antiCode)
q.Set("t", "102")
q.Set("ctype", "tars_mp")
q.Set("wsTime", strconv.FormatInt(time.Now().Unix()+21600, 16))
q.Set("ver", "1")
q.Set("sv", now.Format("2006010215"))
seqId := strconv.Itoa(uid + int(time.Now().UnixNano()/int64(time.Millisecond)))
q.Set("seqid", seqId)
q.Set("uid", strconv.Itoa(uid))
q.Set("uuid", strconv.FormatInt(getUUID(), 10))
h := md5.New()
h.Write([]byte(seqId + "|" + q.Get("ctype") + "|" + q.Get("t")))
ss := hex.EncodeToString(h.Sum(nil))
fm, _ := base64.StdEncoding.DecodeString(q.Get("fm"))
q.Set("fm", strings.Replace(strings.Replace(strings.Replace(strings.Replace(string(fm), "$0", q.Get("uid"), -1), "$1", streamName, -1), "$2", ss, -1), "$3", q.Get("wsTime"), -1))
h.Reset()
h.Write([]byte(q.Get("fm")))
q.Set("wsSecret", hex.EncodeToString(h.Sum(nil)))
q.Del("fm")
if _, ok := q["txyp"]; ok {
q.Del("txyp")
}
return q.Encode()
}
func format(jsonStr string, uid int) map[string]any {
cdnType := map[string]string{"HY": "hycdn", "AL": "alicdn", "TX": "txcdn", "HW": "hwcdn", "HS": "hscdn", "WS": "wscdn"}
ojsonStr := gjson.Get(jsonStr, "roomInfo.tLiveInfo.tLiveStreamInfo.vStreamInfo").String()
fmt.Println(gjson.Get(ojsonStr, "value"))
qreg := regexp.MustCompile(`(?i){"_proto"[\s\S]*?"value":([\s\S]*),"_classname"`)
qres := qreg.FindStringSubmatch(ojsonStr)
gjson.Parse(qres[1]).ForEach(func(_, value gjson.Result) bool {
sFlvUrl := value.Get("sFlvUrl").String()
sFlvUrlSuffix := value.Get("sFlvUrlSuffix").String()
sHlsUrl := value.Get("sHlsUrl").String()
sHlsUrlSuffix := value.Get("sHlsUrlSuffix").String()
sStreamName := value.Get("sStreamName").String()
sCdnType := value.Get("sCdnType").String()
sFlvAntiCode := value.Get("sFlvAntiCode").String()
sHlsAntiCode := value.Get("sHlsAntiCode").String()
if sFlvUrl != "" {
streamInfo["flv"].(map[string]string)[cdnType[sCdnType]] = sFlvUrl + "/" + sStreamName + "." + sFlvUrlSuffix + "?" + processAntiCode(sFlvAntiCode, uid, sStreamName)
}
if sHlsUrl != "" {
streamInfo["hls"].(map[string]string)[cdnType[sCdnType]] = sHlsUrl + "/" + sStreamName + "." + sHlsUrlSuffix + "?" + processAntiCode(sHlsAntiCode, uid, sStreamName)
}
return true
})
return streamInfo
}
func (h *Huya) GetLiveUrl() any {
liveurl := "https://m.huya.com/" + h.Rid
client := &http.Client{}
r, _ := http.NewRequest("GET", liveurl, nil)
r.Header.Add("user-agent", "Mozilla/5.0 (iPhone; CPU iPhone OS 16_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.3 Mobile/15E148 Safari/604.1")
r.Header.Add("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8")
resp, _ := client.Do(r)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
str := string(body)
freg := regexp.MustCompile(`(?i)<script>[\s\S]window.HNF_GLOBAL_INIT = ([\s\S]*?) </script>`)
res := freg.FindStringSubmatch(str)
if len(res) > 1 && !strings.Contains(res[1], "\"exceptionType\":0") {
jsonStr := res[1]
liveStatus := gjson.Get(jsonStr, "roomInfo.eLiveStatus").Int()
var mediaurl any
if liveStatus == 2 {
realurl := format(jsonStr, uid)
if h.Type == "display" {
return realurl
}
for k, v := range realurl {
if k == h.Media {
if urlarr, ok := v.(map[string]string); ok {
for k, v := range urlarr {
if k == h.Cdn {
mediaurl = strings.Replace(v, "http://", "https://", 1)
}
}
}
}
}
} else if liveStatus == 3 {
liveLineUrl := gjson.Get(jsonStr, "roomProfile.liveLineUrl").String()
if liveLineUrl != "" {
decodedLiveLineUrl, _ := base64.StdEncoding.DecodeString(liveLineUrl)
mediaurl = "https:" + string(decodedLiveLineUrl)
}
} else {
mediaurl = nil
}
return mediaurl
} else if strings.Contains(res[1], "\"exceptionType\":0") {
var h5info any
ostr, _ := getContent("https://www.huya.com/" + h.Rid)
nstr := string(ostr)
lreg := regexp.MustCompile(`(?i)<script>[\s\S]*hyPlayerConfig =[\s\S]*stream: ([\s\S]*)};[\s\S]*window.TT_LIVE_TIMING`)
lres := lreg.FindStringSubmatch(nstr)
gjson.Get(lres[1], "data").ForEach(func(key, value gjson.Result) bool {
if strings.Contains(value.String(), "gameStreamInfoList") {
cdnType := map[string]string{"HY": "hycdn", "AL": "alicdn", "TX": "txcdn", "HW": "hwcdn", "HS": "hscdn", "WS": "wscdn"}
gjson.Get(value.String(), "gameStreamInfoList").ForEach(func(_, value gjson.Result) bool {
sFlvUrl := value.Get("sFlvUrl").String()
sFlvUrlSuffix := value.Get("sFlvUrlSuffix").String()
sHlsUrl := value.Get("sHlsUrl").String()
sHlsUrlSuffix := value.Get("sHlsUrlSuffix").String()
sStreamName := value.Get("sStreamName").String()
sCdnType := value.Get("sCdnType").String()
sFlvAntiCode := value.Get("sFlvAntiCode").String()
sHlsAntiCode := value.Get("sHlsAntiCode").String()
if sFlvUrl != "" {
streamInfo["flv"].(map[string]string)[cdnType[sCdnType]] = sFlvUrl + "/" + sStreamName + "." + sFlvUrlSuffix + "?" + processAntiCode(sFlvAntiCode, uid, sStreamName)
}
if sHlsUrl != "" {
streamInfo["hls"].(map[string]string)[cdnType[sCdnType]] = sHlsUrl + "/" + sStreamName + "." + sHlsUrlSuffix + "?" + processAntiCode(sHlsAntiCode, uid, sStreamName)
}
return true
})
if h.Type == "display" {
h5info = streamInfo
} else {
for k, v := range streamInfo {
if k == h.Media {
if urlarr, ok := v.(map[string]string); ok {
for k, v := range urlarr {
if k == h.Cdn {
h5info = strings.Replace(v, "http://", "https://", 1)
}
}
}
}
}
}
return false
}
return true
})
return h5info
}
return nil
}
================================================
FILE: liveurls/itv.go
================================================
package liveurls
import (
"context"
"io"
"net"
"net/http"
"regexp"
"strings"
"sync"
"time"
)
type Itv struct{}
var (
hostMappings = map[string]string{
"cache.ott.ystenlive.itv.cmvideo.cn": "feiyangdigital.tg.ystenlive.ottdns.com",
"cache.ott.bestlive.itv.cmvideo.cn": "feiyangdigital.tg.bestlive.ottdns.com",
"cache.ott.wasulive.itv.cmvideo.cn": "feiyangdigital.tg.wasulive.ottdns.com",
"cache.ott.fifalive.itv.cmvideo.cn": "feiyangdigital.tg.fifalive.ottdns.com",
"cache.ott.hnbblive.itv.cmvideo.cn": "feiyangdigital.tg.hnbblive.ottdns.com",
}
programList = map[string]string{
"wasusyt/6000000001000029752.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000001000029752/1.m3u8?channel-id=wasusyt&Contentid=6000000001000029752&livemode=1&stbId=3",
"bestzb/5000000004000002226.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000004000002226/1.m3u8?channel-id=bestzb&Contentid=5000000004000002226&livemode=1&stbId=3",
"ystenlive/1000000005000265001.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000005000265001/1.m3u8?channel-id=ystenlive&Contentid=1000000005000265001&livemode=1&stbId=3",
"ystenlive/1000000001000023315.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000001000023315/1.m3u8?channel-id=ystenlive&Contentid=1000000001000023315&livemode=1&stbId=3",
"wasusyt/6000000001000014161.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000001000014161/1.m3u8?channel-id=wasusyt&Contentid=6000000001000014161&livemode=1&stbId=3",
"wasusyt/6000000001000022313.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000001000022313/1.m3u8?channel-id=wasusyt&Contentid=6000000001000022313&livemode=1&stbId=3",
"ystenlive/1000000005000265003.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000005000265003/1.m3u8?channel-id=ystenlive&Contentid=1000000005000265003&livemode=1&stbId=3",
"bestzb/5000000011000031102.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000011000031102/1.m3u8?channel-id=bestzb&Contentid=5000000011000031102&livemode=1&stbId=3",
"ystenlive/1000000005000265004.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000005000265004/1.m3u8?channel-id=ystenlive&Contentid=1000000005000265004&livemode=1&stbId=3",
"ystenlive/1000000005000025222.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000005000025222/1.m3u8?channel-id=ystenlive&Contentid=1000000005000025222&livemode=1&stbId=3",
"ystenlive/1000000005000265005.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000005000265005/1.m3u8?channel-id=ystenlive&Contentid=1000000005000265005&livemode=1&stbId=3",
"wasusyt/6000000001000015875.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000001000015875/1.m3u8?channel-id=wasusyt&Contentid=6000000001000015875&livemode=1&stbId=3",
"ystenlive/1000000005000265016.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000005000265016/1.m3u8?channel-id=ystenlive&Contentid=1000000005000265016&livemode=1&stbId=3",
"ystenlive/1000000001000001737.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000001000001737/1.m3u8?channel-id=ystenlive&Contentid=1000000001000001737&livemode=1&stbId=3",
"wasusyt/6000000001000004574.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000001000004574/1.m3u8?channel-id=wasusyt&Contentid=6000000001000004574&livemode=1&stbId=3",
"ystenlive/1000000005000265006.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000005000265006/1.m3u8?channel-id=ystenlive&Contentid=1000000005000265006&livemode=1&stbId=3",
"ystenlive/1000000001000024341.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000001000024341/1.m3u8?channel-id=ystenlive&Contentid=1000000001000024341&livemode=1&stbId=3",
"wasusyt/6000000001000009055.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000001000009055/1.m3u8?channel-id=wasusyt&Contentid=6000000001000009055&livemode=1&stbId=3",
"ystenlive/1000000005000265007.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000005000265007/1.m3u8?channel-id=ystenlive&Contentid=1000000005000265007&livemode=1&stbId=3",
"wasusyt/6000000001000001070.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000001000001070/1.m3u8?channel-id=wasusyt&Contentid=6000000001000001070&livemode=1&stbId=3",
"ystenlive/1000000005000265008.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000005000265008/1.m3u8?channel-id=ystenlive&Contentid=1000000005000265008&livemode=1&stbId=3",
"ystenlive/1000000001000014583.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000001000014583/1.m3u8?channel-id=ystenlive&Contentid=1000000001000014583&livemode=1&stbId=3",
"wasusyt/6000000001000032162.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000001000032162/1.m3u8?channel-id=wasusyt&Contentid=6000000001000032162&livemode=1&stbId=3",
"ystenlive/1000000005000265009.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000005000265009/1.m3u8?channel-id=ystenlive&Contentid=1000000005000265009&livemode=1&stbId=3",
"ystenlive/1000000001000023734.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000001000023734/1.m3u8?channel-id=ystenlive&Contentid=1000000001000023734&livemode=1&stbId=3",
"bestzb/5000000004000012827.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000004000012827/1.m3u8?channel-id=bestzb&Contentid=5000000004000012827&livemode=1&stbId=3",
"ystenlive/1000000005000265010.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000005000265010/1.m3u8?channel-id=ystenlive&Contentid=1000000005000265010&livemode=1&stbId=3",
"bestzb/5000000011000031106.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000011000031106/1.m3u8?channel-id=bestzb&Contentid=5000000011000031106&livemode=1&stbId=3",
"ystenlive/1000000005000265011.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000005000265011/1.m3u8?channel-id=ystenlive&Contentid=1000000005000265011&livemode=1&stbId=3",
"ystenlive/1000000001000032494.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000001000032494/1.m3u8?channel-id=ystenlive&Contentid=1000000001000032494&livemode=1&stbId=3",
"wasusyt/6000000001000022586.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000001000022586/1.m3u8?channel-id=wasusyt&Contentid=6000000001000022586&livemode=1&stbId=3",
"ystenlive/1000000005000265012.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000005000265012/1.m3u8?channel-id=ystenlive&Contentid=1000000005000265012&livemode=1&stbId=3",
"bestzb/5000000011000031108.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000011000031108/1.m3u8?channel-id=bestzb&Contentid=5000000011000031108&livemode=1&stbId=3",
"ystenlive/1000000001000008170.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000001000008170/1.m3u8?channel-id=ystenlive&Contentid=1000000001000008170&livemode=1&stbId=3",
"bestzb/5000000004000006673.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000004000006673/1.m3u8?channel-id=bestzb&Contentid=5000000004000006673&livemode=1&stbId=3",
"ystenlive/1000000005000265013.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000005000265013/1.m3u8?channel-id=ystenlive&Contentid=1000000005000265013&livemode=1&stbId=3",
"bestzb/5000000011000031109.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000011000031109/1.m3u8?channel-id=bestzb&Contentid=5000000011000031109&livemode=1&stbId=3",
"ystenlive/1000000005000265014.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000005000265014/1.m3u8?channel-id=ystenlive&Contentid=1000000005000265014&livemode=1&stbId=3",
"ystenlive/1000000006000233002.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000006000233002/1.m3u8?channel-id=ystenlive&Contentid=1000000006000233002&livemode=1&stbId=3",
"bestzb/5000000008000023254.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000008000023254/1.m3u8?channel-id=bestzb&Contentid=5000000008000023254&livemode=1&stbId=3",
"ystenlive/1000000006000268004.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000006000268004/1.m3u8?channel-id=ystenlive&Contentid=1000000006000268004&livemode=1&stbId=3",
"ystenlive/1000000005000265015.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000005000265015/1.m3u8?channel-id=ystenlive&Contentid=1000000005000265015&livemode=1&stbId=3",
"hnbblive/7745129417417101820.m3u8": "http://gslbserv.itv.cmvideo.cn:80/7745129417417101820/1.m3u8?channel-id=hnbblive&Contentid=7745129417417101820&livemode=1&stbId=3",
"hnbblive/7114647837765104058.m3u8": "http://gslbserv.itv.cmvideo.cn:80/7114647837765104058/1.m3u8?channel-id=hnbblive&Contentid=7114647837765104058&livemode=1&stbId=3",
"bestzb/5000000002000002652.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000002000002652/1.m3u8?channel-id=bestzb&Contentid=5000000002000002652&livemode=1&stbId=3",
"bestzb/5000000011000031126.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000011000031126/1.m3u8?channel-id=bestzb&Contentid=5000000011000031126&livemode=1&stbId=3",
"wasusyt/6000000001000020451.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000001000020451/1.m3u8?channel-id=wasusyt&Contentid=6000000001000020451&livemode=1&stbId=3",
"ystenlive/1000000005000265027.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000005000265027/1.m3u8?channel-id=ystenlive&Contentid=1000000005000265027&livemode=1&stbId=3",
"ystenlive/1000000001000001910.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000001000001910/1.m3u8?channel-id=ystenlive&Contentid=1000000001000001910&livemode=1&stbId=3",
"ystenlive/1000000005000265020.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000005000265020/1.m3u8?channel-id=ystenlive&Contentid=1000000005000265020&livemode=1&stbId=3",
"bestzb/7851974109718180595.m3u8": "http://gslbserv.itv.cmvideo.cn:80/7851974109718180595/1.m3u8?channel-id=bestzb&Contentid=7851974109718180595&livemode=1&stbId=3",
"ystenlive/1000000001000030159.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000001000030159/1.m3u8?channel-id=ystenlive&Contentid=1000000001000030159&livemode=1&stbId=3",
"wasusyt/6000000001000009954.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000001000009954/1.m3u8?channel-id=wasusyt&Contentid=6000000001000009954&livemode=1&stbId=3",
"ystenlive/1000000005000265025.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000005000265025/1.m3u8?channel-id=ystenlive&Contentid=1000000005000265025&livemode=1&stbId=3",
"bestzb/5000000004000010584.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000004000010584/1.m3u8?channel-id=bestzb&Contentid=5000000004000010584&livemode=1&stbId=3",
"ystenlive/1000000005000265033.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000005000265033/1.m3u8?channel-id=ystenlive&Contentid=1000000005000265033&livemode=1&stbId=3",
"bestzb/5000000011000031121.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000011000031121/1.m3u8?channel-id=bestzb&Contentid=5000000011000031121&livemode=1&stbId=3",
"ystenlive/1000000001000014176.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000001000014176/1.m3u8?channel-id=ystenlive&Contentid=1000000001000014176&livemode=1&stbId=3",
"wasusyt/6000000001000031076.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000001000031076/1.m3u8?channel-id=wasusyt&Contentid=6000000001000031076&livemode=1&stbId=3",
"ystenlive/1000000005000265034.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000005000265034/1.m3u8?channel-id=ystenlive&Contentid=1000000005000265034&livemode=1&stbId=3",
"bestzb/5000000011000031118.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000011000031118/1.m3u8?channel-id=bestzb&Contentid=5000000011000031118&livemode=1&stbId=3",
"bestzb/5000000004000025843.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000004000025843/1.m3u8?channel-id=bestzb&Contentid=5000000004000025843&livemode=1&stbId=3",
"bestzb/5000000004000006211.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000004000006211/1.m3u8?channel-id=bestzb&Contentid=5000000004000006211&livemode=1&stbId=3",
"bestzb/5000000006000040016.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000006000040016/1.m3u8?channel-id=bestzb&Contentid=5000000006000040016&livemode=1&stbId=3",
"bestzb/5000000011000031119.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000011000031119/1.m3u8?channel-id=bestzb&Contentid=5000000011000031119&livemode=1&stbId=3",
"ystenlive/1000000001000001925.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000001000001925/1.m3u8?channel-id=ystenlive&Contentid=1000000001000001925&livemode=1&stbId=3",
"wasusyt/6000000001000016510.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000001000016510/1.m3u8?channel-id=wasusyt&Contentid=6000000001000016510&livemode=1&stbId=3",
"ystenlive/1000000005000265029.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000005000265029/1.m3u8?channel-id=ystenlive&Contentid=1000000005000265029&livemode=1&stbId=3",
"ystenlive/1000000001000024621.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000001000024621/1.m3u8?channel-id=ystenlive&Contentid=1000000001000024621&livemode=1&stbId=3",
"wasusyt/6000000001000015436.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000001000015436/1.m3u8?channel-id=wasusyt&Contentid=6000000001000015436&livemode=1&stbId=3",
"ystenlive/1000000005000265023.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000005000265023/1.m3u8?channel-id=ystenlive&Contentid=1000000005000265023&livemode=1&stbId=3",
"bestzb/5000000004000006692.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000004000006692/1.m3u8?channel-id=bestzb&Contentid=5000000004000006692&livemode=1&stbId=3",
"wasusyt/6000000001000018044.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000001000018044/1.m3u8?channel-id=wasusyt&Contentid=6000000001000018044&livemode=1&stbId=3",
"ystenlive/1000000005000265024.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000005000265024/1.m3u8?channel-id=ystenlive&Contentid=1000000005000265024&livemode=1&stbId=3",
"bestzb/5000000011000031203.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000011000031203/1.m3u8?channel-id=bestzb&Contentid=5000000011000031203&livemode=1&stbId=3",
"bestzb/5000000011000031206.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000011000031206/1.m3u8?channel-id=bestzb&Contentid=5000000011000031206&livemode=1&stbId=3",
"bestzb/5000000011000031209.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000011000031209/1.m3u8?channel-id=bestzb&Contentid=5000000011000031209&livemode=1&stbId=3",
"bestzb/5000000011000031117.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000011000031117/1.m3u8?channel-id=bestzb&Contentid=5000000011000031117&livemode=1&stbId=3",
"wasusyt/6000000001000014861.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000001000014861/1.m3u8?channel-id=wasusyt&Contentid=6000000001000014861&livemode=1&stbId=3",
"ystenlive/1000000001000001828.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000001000001828/1.m3u8?channel-id=ystenlive&Contentid=1000000001000001828&livemode=1&stbId=3",
"ystenlive/1000000005000265030.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000005000265030/1.m3u8?channel-id=ystenlive&Contentid=1000000005000265030&livemode=1&stbId=3",
"ystenlive/1000000006000268001.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000006000268001/1.m3u8?channel-id=ystenlive&Contentid=1000000006000268001&livemode=1&stbId=3",
"ystenlive/1000000005000265032.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000005000265032/1.m3u8?channel-id=ystenlive&Contentid=1000000005000265032&livemode=1&stbId=3",
"bestzb/5000000004000011671.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000004000011671/1.m3u8?channel-id=bestzb&Contentid=5000000004000011671&livemode=1&stbId=3",
"ystenlive/1000000005000265022.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000005000265022/1.m3u8?channel-id=ystenlive&Contentid=1000000005000265022&livemode=1&stbId=3",
"ystenlive/1000000002000013359.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000002000013359/1.m3u8?channel-id=ystenlive&Contentid=1000000002000013359&livemode=1&stbId=3",
"ystenlive/1000000001000016568.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000001000016568/1.m3u8?channel-id=ystenlive&Contentid=1000000001000016568&livemode=1&stbId=3",
"wasusyt/6000000001000004134.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000001000004134/1.m3u8?channel-id=wasusyt&Contentid=6000000001000004134&livemode=1&stbId=3",
"ystenlive/1000000005000265019.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000005000265019/1.m3u8?channel-id=ystenlive&Contentid=1000000005000265019&livemode=1&stbId=3",
"wasusyt/6000000001000003639.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000001000003639/1.m3u8?channel-id=wasusyt&Contentid=6000000001000003639&livemode=1&stbId=3",
"bestzb/5000000004000014098.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000004000014098/1.m3u8?channel-id=bestzb&Contentid=5000000004000014098&livemode=1&stbId=3",
"ystenlive/1000000005000265018.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000005000265018/1.m3u8?channel-id=ystenlive&Contentid=1000000005000265018&livemode=1&stbId=3",
"bestzb/5000000010000030951.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000010000030951/1.m3u8?channel-id=bestzb&Contentid=5000000010000030951&livemode=1&stbId=3",
"bestzb/5000000010000027146.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000010000027146/1.m3u8?channel-id=bestzb&Contentid=5000000010000027146&livemode=1&stbId=3",
"bestzb/5000000007000010003.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000007000010003/1.m3u8?channel-id=bestzb&Contentid=5000000007000010003&livemode=1&stbId=3",
"bestzb/5000000010000032212.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000010000032212/1.m3u8?channel-id=bestzb&Contentid=5000000010000032212&livemode=1&stbId=3",
"bestzb/5000000010000018926.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000010000018926/1.m3u8?channel-id=bestzb&Contentid=5000000010000018926&livemode=1&stbId=3",
"hnbblive/2000000002000000014.m3u8": "http://gslbserv.itv.cmvideo.cn:80/2000000002000000014/1.m3u8?channel-id=hnbblive&Contentid=2000000002000000014&livemode=1&stbId=3",
"bestzb/5000000011000031123.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000011000031123/1.m3u8?channel-id=bestzb&Contentid=5000000011000031123&livemode=1&stbId=3",
"bestzb/5000000004000010282.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000004000010282/1.m3u8?channel-id=bestzb&Contentid=5000000004000010282&livemode=1&stbId=3",
"ystenlive/1000000005000265021.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000005000265021/1.m3u8?channel-id=ystenlive&Contentid=1000000005000265021&livemode=1&stbId=3",
"bestzb/5000000010000017540.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000010000017540/1.m3u8?channel-id=bestzb&Contentid=5000000010000017540&livemode=1&stbId=3",
"bestzb/5000000011000031110.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000011000031110/1.m3u8?channel-id=bestzb&Contentid=5000000011000031110&livemode=1&stbId=3",
"bestzb/5000000004000007410.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000004000007410/1.m3u8?channel-id=bestzb&Contentid=5000000004000007410&livemode=1&stbId=3",
"wasusyt/6000000001000002116.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000001000002116/1.m3u8?channel-id=wasusyt&Contentid=6000000001000002116&livemode=1&stbId=3",
"ystenlive/1000000005000265028.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000005000265028/1.m3u8?channel-id=ystenlive&Contentid=1000000005000265028&livemode=1&stbId=3",
"bestzb/5000000004000006119.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000004000006119/1.m3u8?channel-id=bestzb&Contentid=5000000004000006119&livemode=1&stbId=3",
"bestzb/5000000004000006827.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000004000006827/1.m3u8?channel-id=bestzb&Contentid=5000000004000006827&livemode=1&stbId=3",
"wasusyt/6000000001000009186.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000001000009186/1.m3u8?channel-id=wasusyt&Contentid=6000000001000009186&livemode=1&stbId=3",
"ystenlive/1000000005000265026.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000005000265026/1.m3u8?channel-id=ystenlive&Contentid=1000000005000265026&livemode=1&stbId=3",
"bestzb/5000000011000031120.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000011000031120/1.m3u8?channel-id=bestzb&Contentid=5000000011000031120&livemode=1&stbId=3",
"bestzb/5000000004000007275.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000004000007275/1.m3u8?channel-id=bestzb&Contentid=5000000004000007275&livemode=1&stbId=3",
"ystenlive/1000000001000014260.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000001000014260/1.m3u8?channel-id=ystenlive&Contentid=1000000001000014260&livemode=1&stbId=3",
"ystenlive/1000000005000265031.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000005000265031/1.m3u8?channel-id=ystenlive&Contentid=1000000005000265031&livemode=1&stbId=3",
"ystenlive/1000000001000001096.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000001000001096/1.m3u8?channel-id=ystenlive&Contentid=1000000001000001096&livemode=1&stbId=3",
"ystenlive/1000000005000265017.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000005000265017/1.m3u8?channel-id=ystenlive&Contentid=1000000005000265017&livemode=1&stbId=3",
"wasusyt/6000000003000004748.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000003000004748/1.m3u8?channel-id=wasusyt&Contentid=6000000003000004748&livemode=1&stbId=3",
"ystenlive/1000000004000011651.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000004000011651/1.m3u8?channel-id=ystenlive&Contentid=1000000004000011651&livemode=1&stbId=3",
"FifastbLive/3000000010000005180.m3u8": "http://gslbserv.itv.cmvideo.cn:80/3000000010000005180/1.m3u8?channel-id=FifastbLive&Contentid=3000000010000005180&livemode=1&stbId=3",
"FifastbLive/3000000010000015686.m3u8": "http://gslbserv.itv.cmvideo.cn:80/3000000010000015686/1.m3u8?channel-id=FifastbLive&Contentid=3000000010000015686&livemode=1&stbId=3",
"FifastbLive/3000000020000031315.m3u8": "http://gslbserv.itv.cmvideo.cn:80/3000000020000031315/1.m3u8?channel-id=FifastbLive&Contentid=3000000020000031315&livemode=1&stbId=3",
"wasusyt/6000000002000010046.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000002000010046/1.m3u8?channel-id=wasusyt&Contentid=6000000002000010046&livemode=1&stbId=3",
"wasusyt/6000000002000032052.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000002000032052/1.m3u8?channel-id=wasusyt&Contentid=6000000002000032052&livemode=1&stbId=3",
"wasusyt/6000000002000032344.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000002000032344/1.m3u8?channel-id=wasusyt&Contentid=6000000002000032344&livemode=1&stbId=3",
"wasusyt/6000000002000003382.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000002000003382/1.m3u8?channel-id=wasusyt&Contentid=6000000002000003382&livemode=1&stbId=3",
"ystenlive/1000000004000019008.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000004000019008/1.m3u8?channel-id=ystenlive&Contentid=1000000004000019008&livemode=1&stbId=3",
"ystenlive/1000000004000013968.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000004000013968/1.m3u8?channel-id=ystenlive&Contentid=1000000004000013968&livemode=1&stbId=3",
"ystenlive/1000000004000013730.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000004000013730/1.m3u8?channel-id=ystenlive&Contentid=1000000004000013730&livemode=1&stbId=3",
"ystenlive/1000000004000014634.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000004000014634/1.m3u8?channel-id=ystenlive&Contentid=1000000004000014634&livemode=1&stbId=3",
"ystenlive/1000000006000032328.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000006000032328/1.m3u8?channel-id=ystenlive&Contentid=1000000006000032328&livemode=1&stbId=3",
"hnbblive/2000000003000000010.m3u8": "http://gslbserv.itv.cmvideo.cn:80/2000000003000000010/1.m3u8?channel-id=hnbblive&Contentid=2000000003000000010&livemode=1&stbId=3",
"ystenlive/1000000006000268003.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000006000268003/1.m3u8?channel-id=ystenlive&Contentid=1000000006000268003&livemode=1&stbId=3",
"ystenlive/1000000003000012426.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000003000012426/1.m3u8?channel-id=ystenlive&Contentid=1000000003000012426&livemode=1&stbId=3",
"ystenlive/1000000001000009601.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000001000009601/1.m3u8?channel-id=ystenlive&Contentid=1000000001000009601&livemode=1&stbId=3",
"ystenlive/1000000006000268002.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000006000268002/1.m3u8?channel-id=ystenlive&Contentid=1000000006000268002&livemode=1&stbId=3",
"hnbblive/2000000003000000018.m3u8": "http://gslbserv.itv.cmvideo.cn:80/2000000003000000018/1.m3u8?channel-id=hnbblive&Contentid=2000000003000000018&livemode=1&stbId=3",
"ystenlive/1000000005000266013.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000005000266013/1.m3u8?channel-id=ystenlive&Contentid=1000000005000266013&livemode=1&stbId=3",
"ystenlive/1000000004000018653.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000004000018653/1.m3u8?channel-id=ystenlive&Contentid=1000000004000018653&livemode=1&stbId=3",
"hnbblive/2000000003000000024.m3u8": "http://gslbserv.itv.cmvideo.cn:80/2000000003000000024/1.m3u8?channel-id=hnbblive&Contentid=2000000003000000024&livemode=1&stbId=3",
"ystenlive/1000000005000266012.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000005000266012/1.m3u8?channel-id=ystenlive&Contentid=1000000005000266012&livemode=1&stbId=3",
"ystenlive/1000000004000008284.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000004000008284/1.m3u8?channel-id=ystenlive&Contentid=1000000004000008284&livemode=1&stbId=3",
"ystenlive/1000000004000026167.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000004000026167/1.m3u8?channel-id=ystenlive&Contentid=1000000004000026167&livemode=1&stbId=3",
"ystenlive/1000000004000024282.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000004000024282/1.m3u8?channel-id=ystenlive&Contentid=1000000004000024282&livemode=1&stbId=3",
"hnbblive/2000000003000000014.m3u8": "http://gslbserv.itv.cmvideo.cn:80/2000000003000000014/1.m3u8?channel-id=hnbblive&Contentid=2000000003000000014&livemode=1&stbId=3",
"hnbblive/2000000003000000022.m3u8": "http://gslbserv.itv.cmvideo.cn:80/2000000003000000022/1.m3u8?channel-id=hnbblive&Contentid=2000000003000000022&livemode=1&stbId=3",
"ystenlive/1000000001000006197.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000001000006197/1.m3u8?channel-id=ystenlive&Contentid=1000000001000006197&livemode=1&stbId=3",
"hnbblive/2000000003000000016.m3u8": "http://gslbserv.itv.cmvideo.cn:80/2000000003000000016/1.m3u8?channel-id=hnbblive&Contentid=2000000003000000016&livemode=1&stbId=3",
"hnbblive/2000000003000000003.m3u8": "http://gslbserv.itv.cmvideo.cn:80/2000000003000000003/1.m3u8?channel-id=hnbblive&Contentid=2000000003000000003&livemode=1&stbId=3",
"hnbblive/2000000003000000007.m3u8": "http://gslbserv.itv.cmvideo.cn:80/2000000003000000007/1.m3u8?channel-id=hnbblive&Contentid=2000000003000000007&livemode=1&stbId=3",
"ystenlive/1000000001000000515.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000001000000515/1.m3u8?channel-id=ystenlive&Contentid=1000000001000000515&livemode=1&stbId=3",
"ystenlive/1000000005000266011.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000005000266011/1.m3u8?channel-id=ystenlive&Contentid=1000000005000266011&livemode=1&stbId=3",
"hnbblive/2000000003000000009.m3u8": "http://gslbserv.itv.cmvideo.cn:80/2000000003000000009/1.m3u8?channel-id=hnbblive&Contentid=2000000003000000009&livemode=1&stbId=3",
"ystenlive/1000000004000019624.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000004000019624/1.m3u8?channel-id=ystenlive&Contentid=1000000004000019624&livemode=1&stbId=3",
"ystenlive/1000000004000021734.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000004000021734/1.m3u8?channel-id=ystenlive&Contentid=1000000004000021734&livemode=1&stbId=3",
"ystenlive/1000000006000032327.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000006000032327/1.m3u8?channel-id=ystenlive&Contentid=1000000006000032327&livemode=1&stbId=3",
"ystenlive/1000000001000003775.m3u8": "http://gslbserv.itv.cmvideo.cn:80/1000000001000003775/1.m3u8?channel-id=ystenlive&Contentid=1000000001000003775&livemode=1&stbId=3",
"bestzb/5000000011000031113.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000011000031113/1.m3u8?channel-id=bestzb&Contentid=5000000011000031113&livemode=1&stbId=3",
"bestzb/5000000011000031111.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000011000031111/1.m3u8?channel-id=bestzb&Contentid=5000000011000031111&livemode=1&stbId=3",
"bestzb/9001547084732463424.m3u8": "http://gslbserv.itv.cmvideo.cn:80/9001547084732463424/1.m3u8?channel-id=bestzb&Contentid=9001547084732463424&livemode=1&stbId=3",
"bestzb/5000000002000009455.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000002000009455/1.m3u8?channel-id=bestzb&Contentid=5000000002000009455&livemode=1&stbId=3",
"bestzb/5000000007000010001.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000007000010001/1.m3u8?channel-id=bestzb&Contentid=5000000007000010001&livemode=1&stbId=3",
"bestzb/5000000010000026105.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000010000026105/1.m3u8?channel-id=bestzb&Contentid=5000000010000026105&livemode=1&stbId=3",
"bestzb/5000000002000029972.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000002000029972/1.m3u8?channel-id=bestzb&Contentid=5000000002000029972&livemode=1&stbId=3",
"bestzb/5000000011000031112.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000011000031112/1.m3u8?channel-id=bestzb&Contentid=5000000011000031112&livemode=1&stbId=3",
"bestzb/5000000011000031207.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000011000031207/1.m3u8?channel-id=bestzb&Contentid=5000000011000031207&livemode=1&stbId=3",
"bestzb/5000000011000031116.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000011000031116/1.m3u8?channel-id=bestzb&Contentid=5000000011000031116&livemode=1&stbId=3",
"bestzb/5000000002000019634.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000002000019634/1.m3u8?channel-id=bestzb&Contentid=5000000002000019634&livemode=1&stbId=3",
"bestzb/5000000011000031114.m3u8": "http://gslbserv.itv.cmvideo.cn:80/5000000011000031114/1.m3u8?channel-id=bestzb&Contentid=5000000011000031114&livemode=1&stbId=3",
"wasusyt/6000000006000230630.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000006000230630/1.m3u8?channel-id=wasusyt&Contentid=6000000006000230630&livemode=1&stbId=3",
"wasusyt/6000000006000070630.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000006000070630/1.m3u8?channel-id=wasusyt&Contentid=6000000006000070630&livemode=1&stbId=3",
"wasusyt/6000000006000280630.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000006000280630/1.m3u8?channel-id=wasusyt&Contentid=6000000006000280630&livemode=1&stbId=3",
"wasusyt/6000000006000080630.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000006000080630/1.m3u8?channel-id=wasusyt&Contentid=6000000006000080630&livemode=1&stbId=3",
"wasusyt/6000000006000260630.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000006000260630/1.m3u8?channel-id=wasusyt&Contentid=6000000006000260630&livemode=1&stbId=3",
"wasusyt/6000000006000060630.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000006000060630/1.m3u8?channel-id=wasusyt&Contentid=6000000006000060630&livemode=1&stbId=3",
"wasusyt/6000000006000020630.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000006000020630/1.m3u8?channel-id=wasusyt&Contentid=6000000006000020630&livemode=1&stbId=3",
"wasusyt/6000000006000160630.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000006000160630/1.m3u8?channel-id=wasusyt&Contentid=6000000006000160630&livemode=1&stbId=3",
"wasusyt/6000000006000040630.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000006000040630/1.m3u8?channel-id=wasusyt&Contentid=6000000006000040630&livemode=1&stbId=3",
"wasusyt/6000000006000150630.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000006000150630/1.m3u8?channel-id=wasusyt&Contentid=6000000006000150630&livemode=1&stbId=3",
"wasusyt/6000000006000250630.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000006000250630/1.m3u8?channel-id=wasusyt&Contentid=6000000006000250630&livemode=1&stbId=3",
"wasusyt/6000000006000270630.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000006000270630/1.m3u8?channel-id=wasusyt&Contentid=6000000006000270630&livemode=1&stbId=3",
"wasusyt/6000000006000100630.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000006000100630/1.m3u8?channel-id=wasusyt&Contentid=6000000006000100630&livemode=1&stbId=3",
"wasusyt/6000000006000240630.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000006000240630/1.m3u8?channel-id=wasusyt&Contentid=6000000006000240630&livemode=1&stbId=3",
"wasusyt/6000000006000290630.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000006000290630/1.m3u8?channel-id=wasusyt&Contentid=6000000006000290630&livemode=1&stbId=3",
"wasusyt/6000000006000220630.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000006000220630/1.m3u8?channel-id=wasusyt&Contentid=6000000006000220630&livemode=1&stbId=3",
"wasusyt/6000000006000010630.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000006000010630/1.m3u8?channel-id=wasusyt&Contentid=6000000006000010630&livemode=1&stbId=3",
"wasusyt/6000000006000050630.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000006000050630/1.m3u8?channel-id=wasusyt&Contentid=6000000006000050630&livemode=1&stbId=3",
"wasusyt/6000000006000180630.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000006000180630/1.m3u8?channel-id=wasusyt&Contentid=6000000006000180630&livemode=1&stbId=3",
"wasusyt/6000000006000030630.m3u8": "http://gslbserv.itv.cmvideo.cn:80/6000000006000030630/1.m3u8?channel-id=wasusyt&Contentid=6000000006000030630&livemode=1&stbId=3",
}
dnsCache = sync.Map{}
successCacheTime = 24 * time.Hour
)
type cacheEntry struct {
ip string
expiry time.Time
}
func (i *Itv) HandleMainRequest(w http.ResponseWriter, r *http.Request, cdn string, id string) {
key := cdn + "/" + id
startUrl, ok := programList[key]
if !ok {
http.Error(w, "id not found!", http.StatusNotFound)
return
}
data, redirectURL, err := getHTTPResponse(startUrl)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
redirectPrefix := redirectURL[:strings.LastIndex(redirectURL, "/")+1]
// 替换TS文件的链接
golang := "http://" + r.Host + r.URL.Path
re := regexp.MustCompile(`((?i).*?\.ts)`)
data = re.ReplaceAllStringFunc(data, func(match string) string {
return golang + "?ts=" + redirectPrefix + match
})
// 将&替换为$
data = strings.ReplaceAll(data, "&", "$")
w.Header().Set("Content-Disposition", "attachment;filename="+id)
w.WriteHeader(http.StatusOK) // Set the status code to 200
w.Write([]byte(data)) // Write the response body
}
func (i *Itv) HandleTsRequest(w http.ResponseWriter, ts string) {
// 将$替换回&
ts = strings.ReplaceAll(ts, "$", "&")
w.Header().Set("Content-Type", "video/MP2T")
content, _, err := getHTTPResponse(ts)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
w.WriteHeader(http.StatusOK) // Set the status code to 200
w.Write([]byte(content)) // Write the response body
}
func getHTTPResponse(requestURL string) (string, string, error) {
dialer := &net.Dialer{
Timeout: 5 * time.Second,
}
var mappedHost string
// 自定义resolver
resolver := net.Resolver{
PreferGo: true,
Dial: func(ctx context.Context, network, address string) (net.Conn, error) {
for originalHost, host := range hostMappings {
if strings.Contains(address, originalHost) {
ip := resolveIP(host)
mappedHost = host
if ip != "" {
address = strings.Replace(address, originalHost, ip, 1)
}
}
}
return dialer.DialContext(ctx, network, address)
},
}
client := &http.Client{
Transport: &http.Transport{
DialContext: resolver.Dial,
},
}
resp, err := client.Get(requestURL)
if err != nil {
if mappedHost != "" {
clearCache(mappedHost) // 清除缓存失败的IP
}
return "", "", err
}
defer resp.Body.Close()
if resp.StatusCode != http.StatusOK {
if mappedHost != "" {
clearCache(mappedHost) // 请求失败清除缓存
}
return "", "", err
}
redirectURL := resp.Header.Get("Location")
if redirectURL == "" {
redirectURL = requestURL
}
body, err := readResponseBody(resp)
if err != nil {
if mappedHost != "" {
clearCache(mappedHost) // 读取响应体失败时清除缓存
}
return "", "", err
}
if mappedHost != "" {
updateCacheTime(mappedHost, successCacheTime) // 成功获取响应后缓存IP
}
return body, redirectURL, nil
}
func resolveIP(host string) string {
now := time.Now()
if entry, found := dnsCache.Load(host); found {
cachedEntry := entry.(cacheEntry)
if now.Before(cachedEntry.expiry) {
return cachedEntry.ip // 使用缓存中的IP
}
dnsCache.Delete(host) // 缓存过期,删除
}
ips, err := net.LookupIP(host) // DNS解析
if err != nil || len(ips) == 0 {
return "" // 解析失败,返回空字符串
}
ip := ips[0].String()
dnsCache.Store(host, cacheEntry{ip: ip, expiry: now.Add(successCacheTime)}) // 缓存解析到的IP
return ip
}
func updateCacheTime(host string, duration time.Duration) {
if entry, found := dnsCache.Load(host); found {
cachedEntry := entry.(cacheEntry)
cachedEntry.expiry = time.Now().Add(duration) // 更新缓存过期时间
dnsCache.Store(host, cachedEntry)
}
}
func clearCache(host string) {
dnsCache.Delete(host) // 删除缓存
}
func readResponseBody(resp *http.Response) (string, error) {
var builder strings.Builder
_, err := io.Copy(&builder, resp.Body)
if err != nil {
return "", err
}
return builder.String(), nil
}
================================================
FILE: liveurls/youtube.go
================================================
// Package liveurls
// @Time:2023/02/17 16:32
// @File:youtube.go
// @SoftWare:Goland
// @Author:Popeye
// @Contact:TG@popeyelau
package liveurls
import (
"bytes"
"fmt"
"github.com/tidwall/gjson"
"io"
"net/http"
"strconv"
"sync"
"time"
"github.com/etherlabsio/go-m3u8/m3u8"
)
var streamCachedMap sync.Map
type Youtube struct {
//https://www.youtube.com/watch?v=cK4LemjoFd0
//Rid: cK4LemjoFd0
Rid string
Quality string
}
func (y *Youtube) GetLiveUrl() any {
if cached, ok := getKey(y.Rid); ok {
return cached
}
//proxyUrl, err := url.Parse("http://127.0.0.1:8888")
client := &http.Client{
Timeout: time.Second * 5,
CheckRedirect: func(req *http.Request, via []*http.Request) error {
return http.ErrUseLastResponse
},
//Transport: &http.Transport{Proxy: http.ProxyURL(proxyUrl)},
}
json := []byte(fmt.Sprintf(`{"context": {"client": {"hl": "zh","clientVersion": "2.20201021.03.00","clientName": "WEB"}},"videoId": "%s"}`, y.Rid))
reqBody := bytes.NewBuffer(json)
r, _ := http.NewRequest("POST", "https://www.youtube.com/youtubei/v1/player", reqBody)
r.Header.Add("user-agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36")
resp, err := client.Do(r)
if err != nil {
return err
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
str := string(body)
stream := gjson.Get(str, "streamingData.hlsManifestUrl")
if stream.Exists() && len(stream.String()) > 0 {
quality := y.getResolution(stream.String())
if quality != nil {
return *quality
}
return stream
}
formats := gjson.Get(str, "streamingData.formats")
if formats.Exists() && formats.IsArray() {
arr := formats.Array()
playback := arr[len(arr)-1].Get("url").String()
return playback
}
return nil
}
func (y *Youtube) getResolution(liveurl string) *string {
client := &http.Client{Timeout: time.Second * 5}
r, _ := http.NewRequest("GET", liveurl, nil)
r.Header.Add("user-agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36")
resp, err := client.Do(r)
if err != nil {
return nil
}
playlist, err := m3u8.Read(resp.Body)
defer resp.Body.Close()
if err != nil {
return nil
}
playlists := playlist.Playlists()
if len(playlists) < 1 {
return nil
}
mapping := map[string]string{}
for _, item := range playlists {
mapping[strconv.Itoa(item.Resolution.Height)] = item.URI
}
if stream, ok := mapping[y.Quality]; ok {
setKey(y.Rid, stream, 600)
return &stream
}
stream := playlists[len(playlists)-1].URI
setKey(y.Rid, stream, 600)
return &stream
}
func setKey(key string, data interface{}, timeout int) {
streamCachedMap.Store(key, data)
time.AfterFunc(time.Second*time.Duration(timeout), func() {
streamCachedMap.Delete(key)
})
}
func getKey(key string) (interface{}, bool) {
return streamCachedMap.Load(key)
}
================================================
FILE: liveurls/ysptp.go
================================================
package liveurls
import (
"Golang/utils"
"encoding/json"
"io"
"net/http"
"regexp"
"strings"
"sync"
"time"
)
type Ysptp struct{}
var cache sync.Map
type CacheItem struct {
Value string
Expiration int64
}
var cctvList = map[string]string{
"cctv1.m3u8": "http://liveali-tpgq.cctv.cn/live/cctv1.m3u8,http://liveali-tpgq.cctv.cn/live/",
"cctv2.m3u8": "http://liveali-tpgq.cctv.cn/live/cctv2.m3u8,http://liveali-tpgq.cctv.cn/live/",
"cctv3.m3u8": "http://liveali-tpgq.cctv.cn/live/cctv3.m3u8,http://liveali-tpgq.cctv.cn/live/",
"cctv4.m3u8": "http://liveali-tpgq.cctv.cn/live/cctv4.m3u8,http://liveali-tpgq.cctv.cn/live/",
"cctv5.m3u8": "http://liveali-tpgq.cctv.cn/live/cctv5.m3u8,http://liveali-tpgq.cctv.cn/live/",
"cctv5p.m3u8": "http://liveali-tpgq.cctv.cn/live/cctv5p.m3u8,http://liveali-tpgq.cctv.cn/live/",
"cctv6.m3u8": "http://liveali-tpgq.cctv.cn/live/cctv6.m3u8,http://liveali-tpgq.cctv.cn/live/",
"cctv7.m3u8": "http://liveali-tpgq.cctv.cn/live/cctv7.m3u8,http://liveali-tpgq.cctv.cn/live/",
"cctv8.m3u8": "http://liveali-tpgq.cctv.cn/live/cctv8.m3u8,http://liveali-tpgq.cctv.cn/live/",
"cctv9.m3u8": "http://liveali-tpgq.cctv.cn/live/cctv9.m3u8,http://liveali-tpgq.cctv.cn/live/",
"cctv10.m3u8": "http://liveali-tpgq.cctv.cn/live/cctv10.m3u8,http://liveali-tpgq.cctv.cn/live/",
"cctv11.m3u8": "http://liveali-tpgq.cctv.cn/live/cctv11.m3u8,http://liveali-tpgq.cctv.cn/live/",
"cctv12.m3u8": "http://liveali-tpgq.cctv.cn/live/cctv12.m3u8,http://liveali-tpgq.cctv.cn/live/",
"cctv13.m3u8": "http://liveali-tpgq.cctv.cn/live/cctv13.m3u8,http://liveali-tpgq.cctv.cn/live/",
"cctv14.m3u8": "http://liveali-tpgq.cctv.cn/live/cctv14.m3u8,http://liveali-tpgq.cctv.cn/live/",
"cctv15.m3u8": "http://liveali-tpgq.cctv.cn/live/cctv15.m3u8,http://liveali-tpgq.cctv.cn/live/",
"cctv16.m3u8": "http://liveali-tpgq.cctv.cn/live/cctv16.m3u8,http://liveali-tpgq.cctv.cn/live/",
"cctv17.m3u8": "http://liveali-tpgq.cctv.cn/live/cctv17.m3u8,http://liveali-tpgq.cctv.cn/live/",
"cgtnar.m3u8": "http://liveali-tpgq.cctv.cn/live/cgtnar.m3u8,http://liveali-tpgq.cctv.cn/live/",
"cgtndoc.m3u8": "http://liveali-tpgq.cctv.cn/live/cgtndoc.m3u8,http://liveali-tpgq.cctv.cn/live/",
"cgtnen.m3u8": "http://liveali-tpgq.cctv.cn/live/cgtnen.m3u8,http://liveali-tpgq.cctv.cn/live/",
"cgtnfr.m3u8": "http://liveali-tpgq.cctv.cn/live/cgtnfr.m3u8,http://liveali-tpgq.cctv.cn/live/",
"cgtnru.m3u8": "http://liveali-tpgq.cctv.cn/live/cgtnru.m3u8,http://liveali-tpgq.cctv.cn/live/",
"cgtnsp.m3u8": "http://liveali-tpgq.cctv.cn/live/cgtnsp.m3u8,http://liveali-tpgq.cctv.cn/live/",
"cctv4k.m3u8": "http://liveali-tpgq.cctv.cn/live/cctv4k.m3u8,http://liveali-tpgq.cctv.cn/live/",
"cctv4k_10m.m3u8": "http://liveali-tpgq.cctv.cn/live/cctv4k10m.m3u8,http://liveali-tpgq.cctv.cn/live/",
"cctv4k16.m3u8": "http://liveali-tpgq.cctv.cn/live/cctv4k16.m3u8,http://liveali-tpgq.cctv.cn/live/",
"cctv4k16_10m.m3u8": "http://liveali-tpgq.cctv.cn/live/cctv4k1610m.m3u8,http://liveali-tpgq.cctv.cn/live/",
"cctv8k_36m.m3u8": "http://liveali-tp4k.cctv.cn/live/4K36M/playlist.m3u8,http://liveali-tp4k.cctv.cn/live/4K36M/",
"cctv8k_120m.m3u8": "http://liveali-tp4k.cctv.cn/live/8K120M/playlist.m3u8,http://liveali-tp4k.cctv.cn/live/8K120M/",
}
func (y *Ysptp) HandleMainRequest(w http.ResponseWriter, r *http.Request, id string) {
uid := utils.DefaultQuery(r, "uid", "1234123122")
if _, ok := cctvList[id]; !ok {
http.Error(w, "id not found!", http.StatusNotFound)
return
}
urls := strings.Split(cctvList[id], ",")
data := getURL(id, urls[0], uid, urls[1])
golang := "http://" + r.Host + r.URL.Path
re := regexp.MustCompile(`((?i).*?\.ts)`)
data = re.ReplaceAllString(data, golang+"?ts="+urls[1]+"$1")
w.Header().Set("Content-Disposition", "attachment;filename="+id)
w.WriteHeader(http.StatusOK) // Set the status code to 200
w.Write([]byte(data)) // Write the response body
}
func (y *Ysptp) HandleTsRequest(w http.ResponseWriter, ts, wsTime string) {
data := ts + "&wsTime=" + wsTime
w.Header().Set("Content-Type", "video/MP2T")
w.WriteHeader(http.StatusOK) // Set the status code to 200
w.Write([]byte(getTs(data))) // Write the response body
}
func getURL(id, url, uid, path string) string {
cacheKey := id + uid
if playURL, found := getCache(cacheKey); found {
return fetchData(playURL, path, uid)
}
bstrURL := "https://ytpvdn.cctv.cn/cctvmobileinf/rest/cctv/videoliveUrl/getstream"
postData := `appcommon={"ap":"cctv_app_tv","an":"央视投屏助手","adid":" ` + uid + `","av":"1.1.7"}&url=` + url
req, _ := http.NewRequest("POST", bstrURL, strings.NewReader(postData))
req.Header.Set("User-Agent", "cctv_app_tv")
req.Header.Set("Referer", "api.cctv.cn")
req.Header.Set("UID", uid)
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
var body strings.Builder
_, _ = io.Copy(&body, resp.Body)
var result map[string]interface{}
json.Unmarshal([]byte(body.String()), &result)
playURL := result["url"].(string)
setCache(cacheKey, playURL)
return fetchData(playURL, path, uid)
}
func fetchData(playURL, path, uid string) string {
client := &http.Client{}
for {
req, _ := http.NewRequest("GET", playURL, nil)
req.Header.Set("User-Agent", "cctv_app_tv")
req.Header.Set("Referer", "api.cctv.cn")
req.Header.Set("UID", uid)
resp, _ := client.Do(req)
defer resp.Body.Close()
var body strings.Builder
_, _ = io.Copy(&body, resp.Body)
data := body.String()
re := regexp.MustCompile(`(.*\.m3u8\?.*)`)
matches := re.FindStringSubmatch(data)
if len(matches) > 0 {
playURL = path + matches[0]
} else {
return data
}
}
}
func getTs(url string) string {
req, _ := http.NewRequest("GET", url, nil)
req.Header.Set("User-Agent", "cctv_app_tv")
req.Header.Set("Referer", "https://api.cctv.cn/")
req.Header.Set("UID", "1234123122")
req.Header.Set("accept", "*/*")
req.Header.Set("accept-encoding", "gzip, deflate")
req.Header.Set("accept-language", "zh-CN,zh;q=0.9")
req.Header.Set("Connection", "keep-alive")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
var body strings.Builder
_, _ = io.Copy(&body, resp.Body)
return body.String()
}
func getCache(key string) (string, bool) {
if item, found := cache.Load(key); found {
cacheItem := item.(CacheItem)
if time.Now().Unix() < cacheItem.Expiration {
return cacheItem.Value, true
}
}
return "", false
}
func setCache(key, value string) {
cache.Store(key, CacheItem{
Value: value,
Expiration: time.Now().Unix() + 3600,
})
}
================================================
FILE: liveurls/yy.go
================================================
// Package liveurls
// @Time:2023/06/03 05:40
// @File:yy.go
// @SoftWare:Goland
// @Author:feiyang
// @Contact:TG@feiyangdigital
package liveurls
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
"regexp"
"strconv"
"time"
)
type Yy struct {
Rid string
Quality string
}
type StreamLineAddr struct {
CdnInfo struct {
Url string `json:"url"`
} `json:"cdn_info"`
}
type Result struct {
AvpInfoRes struct {
StreamLineAddr map[string]StreamLineAddr `json:"stream_line_addr"`
} `json:"avp_info_res"`
}
func (y *Yy) GetLiveUrl() any {
firstrid := y.Rid
quality := y.Quality
var rid string
checkUrl := "https://wap.yy.com/mobileweb/" + firstrid
client := &http.Client{}
req, _ := http.NewRequest("GET", checkUrl, nil)
req.Header.Set("Referer", "https://wap.yy.com")
req.Header.Set("User-Agent", "Mozilla/5.0 (iPhone; CPU iPhone OS 16_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.3 Mobile/15E148 Safari/604.1")
res, _ := client.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
re := regexp.MustCompile(`md5Hash[\s\S]*?sid.*'(.*)'.*?getQuery`)
realdata := re.FindStringSubmatch(string(body))
if len(realdata) > 0 {
rid = realdata[1]
} else {
return nil
}
millis_13 := time.Now().UnixNano() / int64(time.Millisecond)
millis_10 := time.Now().Unix()
data := fmt.Sprintf(`{"head":{"seq":%d,"appidstr":"0","bidstr":"0","cidstr":"%s","sidstr":"%s","uid64":0,"client_type":108,"client_ver":"5.14.13","stream_sys_ver":1,"app":"yylive_web","playersdk_ver":"5.14.13","thundersdk_ver":"0","streamsdk_ver":"5.14.13"},"client_attribute":{"client":"web","model":"","cpu":"","graphics_card":"","os":"chrome","osversion":"118.0.0.0","vsdk_version":"","app_identify":"","app_version":"","business":"","width":"1728","height":"1117","scale":"","client_type":8,"h265":0},"avp_parameter":{"version":1,"client_type":8,"service_type":0,"imsi":0,"send_time":%d,"line_seq":-1,"gear":%s,"ssl":1,"stream_format":0}}`, millis_13, rid, rid, millis_10, quality)
url := "https://stream-manager.yy.com/v3/channel/streams?uid=0&cid=" + rid + "&sid=" + rid + "&appid=0&sequence=" + strconv.FormatInt(millis_13, 10) + "&encode=json"
req, _ = http.NewRequest("POST", url, bytes.NewBuffer([]byte(data)))
req.Header.Set("Content-Type", "text/plain;charset=UTF-8")
req.Header.Set("Referer", "https://www.yy.com/")
req.Header.Set("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36 Edg/106.0.1370.42")
res, _ = client.Do(req)
defer res.Body.Close()
body, _ = io.ReadAll(res.Body)
var result Result
json.Unmarshal(body, &result)
if len(result.AvpInfoRes.StreamLineAddr) > 0 {
var arr []string
for k := range result.AvpInfoRes.StreamLineAddr {
arr = append(arr, k)
}
return result.AvpInfoRes.StreamLineAddr[arr[0]].CdnInfo.Url
} else {
return nil
}
}
================================================
FILE: package.json
================================================
{
"engines": {
"node": "18.x"
}
}
================================================
FILE: utils/http.go
================================================
package utils
import (
"os"
"fmt"
"time"
"net/http"
"net/url"
// "log"
)
func GetTestVideoUrl(w http.ResponseWriter) {
TimeLocation, err := time.LoadLocation("Asia/Shanghai")
if err != nil {
TimeLocation = time.FixedZone("CST", 8*60*60)
}
str_time := time.Now().In(TimeLocation).Format("2006-01-02 15:04:05")
fmt.Fprintln(w, "#EXTM3U")
fmt.Fprintln(w, "#EXTINF:-1 tvg-name=\""+str_time+"\" tvg-logo=\"https://cdn.jsdelivr.net/gh/feiyangdigital/testvideo/tg.jpg\" group-title=\"列表更新时间\","+str_time)
fmt.Fprintln(w, "https://cdn.jsdelivr.net/gh/feiyangdigital/testvideo/time/time.mp4")
fmt.Fprintln(w, "#EXTINF:-1 tvg-name=\"4K60PSDR-H264-AAC测试\" tvg-logo=\"https://cdn.jsdelivr.net/gh/feiyangdigital/testvideo/tg.jpg\" group-title=\"4K频道\",4K60PSDR-H264-AAC测试")
fmt.Fprintln(w, "https://cdn.jsdelivr.net/gh/feiyangdigital/testvideo/sdr4kvideo/index.m3u8")
fmt.Fprintln(w, "#EXTINF:-1 tvg-name=\"4K60PHLG-HEVC-EAC3测试\" tvg-logo=\"https://cdn.jsdelivr.net/gh/feiyangdigital/testvideo/tg.jpg\" group-title=\"4K频道\",4K60PHLG-HEVC-EAC3测试")
fmt.Fprintln(w, "https://cdn.jsdelivr.net/gh/feiyangdigital/testvideo/hlg4kvideo/index.m3u8")
}
func GetLivePrefix(r *http.Request) string {
// 尝试从环境变量读取url
envUrl := os.Getenv("LIVE_URL")
// log.Println("env url:", envUrl)
if envUrl == "" {
// 默认url
envUrl = "https://www.goodiptv.club"
}
firstUrl := DefaultQuery(r, "url", envUrl)
realUrl, _ := url.QueryUnescape(firstUrl)
return realUrl
}
func DefaultQuery(r *http.Request, name string, defaultValue string) string {
param := r.URL.Query().Get(name)
if param == "" {
return defaultValue
}
return param
}
func Duanyan(adurl string, realurl any) string {
var liveurl string
if str, ok := realurl.(string); ok {
liveurl = str
} else {
liveurl = adurl
}
// log.Println("Redirect url:", liveurl)
return liveurl
}
================================================
FILE: utils/jsRun.go
================================================
// Package utils
// @Time:2023/08/24 06:36
// @File:jsRun.go
// @SoftWare:Goland
// @Author:feiyang
// @Contact:TG@feiyangdigital
package utils
import (
"fmt"
js "github.com/dop251/goja"
"sync"
)
type JsUtil struct {
pool sync.Pool
}
func (j *JsUtil) getVm() *js.Runtime {
v := j.pool.Get()
if v != nil {
return v.(*js.Runtime)
}
return js.New()
}
func (j *JsUtil) putVm(vm *js.Runtime) {
vm.Set("global", nil) // 清除全局对象
j.pool.Put(vm)
}
func (j *JsUtil) JsRun(funcContent []string, params ...any) any {
vm := j.getVm()
defer j.putVm(vm)
_, err := vm.RunString(funcContent[0])
if err != nil {
return err
}
jsfn, ok := js.AssertFunction(vm.Get(funcContent[1]))
if !ok {
return fmt.Errorf("执行函数失败")
}
jsValues := make([]js.Value, 0, len(params))
for _, v := range params {
jsValues = append(jsValues, vm.ToValue(v))
}
result, err := jsfn(
js.Undefined(),
jsValues...,
)
if err != nil {
return err
}
return result
}
================================================
FILE: vercel.json
================================================
{
"routes": [
{
"src": "/live/.*",
"dest": "/api/live.go"
},
{
"src": "/yqk/.*",
"dest": "/api/yqk/yqk.go"
},
{
"src": "/favicon.ico",
"dest": "https://assets.vercel.com/image/upload/front/favicon/vercel/favicon.ico"
},
{
"src": "/.*",
"dest": "/api/index.go"
}
]
}
gitextract_wb61vjdu/ ├── LICENSE ├── README.md ├── api/ │ ├── index.go │ ├── live.go │ └── yqk/ │ └── yqk.go ├── go.mod ├── list/ │ ├── douyuyqk.go │ ├── huyayqk.go │ ├── tvm3u.go │ └── yylunbo.go ├── liveurls/ │ ├── bilibili.go │ ├── douyin.go │ ├── douyu.go │ ├── huya.go │ ├── itv.go │ ├── youtube.go │ ├── ysptp.go │ └── yy.go ├── package.json ├── utils/ │ ├── http.go │ └── jsRun.go └── vercel.json
SYMBOL INDEX (69 symbols across 17 files)
FILE: api/index.go
function Handler (line 17) | func Handler(w http.ResponseWriter, r *http.Request) {
FILE: api/live.go
function Handler (line 14) | func Handler(w http.ResponseWriter, r *http.Request) {
FILE: api/yqk/yqk.go
function Handler (line 15) | func Handler(w http.ResponseWriter, r *http.Request) {
FILE: list/douyuyqk.go
type DouYuYqk (line 15) | type DouYuYqk struct
method Douyuyqk (line 30) | func (dy *DouYuYqk) Douyuyqk(requestURL string) ([]byte, error) {
type DouYuResponse (line 18) | type DouYuResponse struct
FILE: list/huyayqk.go
type HuyaYqk (line 15) | type HuyaYqk struct
method HuYaYqk (line 29) | func (hy *HuyaYqk) HuYaYqk(requestURL string) ([]byte, error) {
type YaResponse (line 18) | type YaResponse struct
FILE: list/tvm3u.go
type Tvm3u (line 8) | type Tvm3u struct
method GetTvM3u (line 11) | func (t *Tvm3u) GetTvM3u(w http.ResponseWriter, hostname string) {
FILE: list/yylunbo.go
type Yylist (line 15) | type Yylist struct
method Yylb (line 32) | func (y *Yylist) Yylb(requesturl string) string {
type DataElement (line 18) | type DataElement struct
type ApiResponse (line 25) | type ApiResponse struct
FILE: liveurls/bilibili.go
type BiliBili (line 18) | type BiliBili struct
method GetRealRoomID (line 25) | func (b *BiliBili) GetRealRoomID() any {
method GetPlayUrl (line 52) | func (b *BiliBili) GetPlayUrl() any {
FILE: liveurls/douyin.go
type Douyin (line 19) | type Douyin struct
method GetDouYinUrl (line 24) | func (d *Douyin) GetDouYinUrl() any {
FILE: liveurls/douyu.go
type Douyu (line 22) | type Douyu struct
method GetRoomId (line 34) | func (d *Douyu) GetRoomId() any {
method GetRealUrl (line 52) | func (d *Douyu) GetRealUrl() any {
function md5V3 (line 27) | func md5V3(str string) string {
FILE: liveurls/huya.go
type Huya (line 29) | type Huya struct
method GetLiveUrl (line 161) | func (h *Huya) GetLiveUrl() any {
type Data (line 36) | type Data struct
type Payload (line 39) | type Payload struct
type ResponseData (line 47) | type ResponseData struct
function getContent (line 53) | func getContent(apiUrl string) ([]byte, error) {
function getUid (line 88) | func getUid() string {
function getUUID (line 98) | func getUUID() int64 {
function processAntiCode (line 104) | func processAntiCode(antiCode string, uid int, streamName string) string {
function format (line 135) | func format(jsonStr string, uid int) map[string]any {
FILE: liveurls/itv.go
type Itv (line 14) | type Itv struct
method HandleMainRequest (line 224) | func (i *Itv) HandleMainRequest(w http.ResponseWriter, r *http.Request...
method HandleTsRequest (line 254) | func (i *Itv) HandleTsRequest(w http.ResponseWriter, ts string) {
type cacheEntry (line 219) | type cacheEntry struct
function getHTTPResponse (line 268) | func getHTTPResponse(requestURL string) (string, string, error) {
function resolveIP (line 334) | func resolveIP(host string) string {
function updateCacheTime (line 354) | func updateCacheTime(host string, duration time.Duration) {
function clearCache (line 362) | func clearCache(host string) {
function readResponseBody (line 366) | func readResponseBody(resp *http.Response) (string, error) {
FILE: liveurls/youtube.go
type Youtube (line 25) | type Youtube struct
method GetLiveUrl (line 32) | func (y *Youtube) GetLiveUrl() any {
method getResolution (line 76) | func (y *Youtube) getResolution(liveurl string) *string {
function setKey (line 111) | func setKey(key string, data interface{}, timeout int) {
function getKey (line 118) | func getKey(key string) (interface{}, bool) {
FILE: liveurls/ysptp.go
type Ysptp (line 14) | type Ysptp struct
method HandleMainRequest (line 56) | func (y *Ysptp) HandleMainRequest(w http.ResponseWriter, r *http.Reque...
method HandleTsRequest (line 75) | func (y *Ysptp) HandleTsRequest(w http.ResponseWriter, ts, wsTime stri...
type CacheItem (line 18) | type CacheItem struct
function getURL (line 82) | func getURL(id, url, uid, path string) string {
function fetchData (line 111) | func fetchData(playURL, path, uid string) string {
function getTs (line 135) | func getTs(url string) string {
function getCache (line 154) | func getCache(key string) (string, bool) {
function setCache (line 164) | func setCache(key, value string) {
FILE: liveurls/yy.go
type Yy (line 21) | type Yy struct
method GetLiveUrl (line 38) | func (y *Yy) GetLiveUrl() any {
type StreamLineAddr (line 26) | type StreamLineAddr struct
type Result (line 32) | type Result struct
FILE: utils/http.go
function GetTestVideoUrl (line 12) | func GetTestVideoUrl(w http.ResponseWriter) {
function GetLivePrefix (line 27) | func GetLivePrefix(r *http.Request) string {
function DefaultQuery (line 40) | func DefaultQuery(r *http.Request, name string, defaultValue string) str...
function Duanyan (line 48) | func Duanyan(adurl string, realurl any) string {
FILE: utils/jsRun.go
type JsUtil (line 16) | type JsUtil struct
method getVm (line 20) | func (j *JsUtil) getVm() *js.Runtime {
method putVm (line 28) | func (j *JsUtil) putVm(vm *js.Runtime) {
method JsRun (line 33) | func (j *JsUtil) JsRun(funcContent []string, params ...any) any {
Condensed preview — 22 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (164K chars).
[
{
"path": "LICENSE",
"chars": 1068,
"preview": "MIT License\n\nCopyright (c) 2023 papagaye744\n\nPermission is hereby granted, free of charge, to any person obtaining a cop"
},
{
"path": "README.md",
"chars": 139,
"preview": "# 源仓库已闭源\n\n建议自己部署docker的allinone使用,[https://hub.docker.com/r/youshandefeiyang/allinone](https://hub.docker.com/r/youshand"
},
{
"path": "api/index.go",
"chars": 7786,
"preview": "package handler\r\n \r\nimport (\r\n \"Golang/liveurls\"\r\n \"Golang/list\"\r\n \"Golang/utils\"\r\n \"fmt\"\r\n \"net/http\"\r\n \"strings\""
},
{
"path": "api/live.go",
"chars": 3617,
"preview": "package handler\n\nimport (\n \"Golang/liveurls\"\n \"Golang/utils\"\n \"fmt\"\n \"net/http\"\n \"strings\"\n \"log\"\n \"os\"\n)\n\n// ver"
},
{
"path": "api/yqk/yqk.go",
"chars": 3082,
"preview": "package yqk\r\n\r\nimport (\r\n \"Golang/list\"\r\n \"Golang/utils\"\r\n \"fmt\"\r\n \"encoding/json\"\r\n \"net/http\"\r\n \"strconv\"\r\n \"lo"
},
{
"path": "go.mod",
"chars": 396,
"preview": "module Golang\r\n\r\ngo 1.19\r\n\r\nrequire (\r\n\tgithub.com/dop251/goja v0.0.0-20230203172422-5460598cfa32\r\n\tgithub.com/etherlabs"
},
{
"path": "list/douyuyqk.go",
"chars": 1003,
"preview": "// Package list\r\n// @Time:2023/06/02 10:00\r\n// @File:mian.go\r\n// @SoftWare:Goland\r\n// @Author:feiyang\r\n// @Contact:TG@fe"
},
{
"path": "list/huyayqk.go",
"chars": 1057,
"preview": "// Package list\r\n// @Time:2023/06/02 10:00\r\n// @File:mian.go\r\n// @SoftWare:Goland\r\n// @Author:feiyang\r\n// @Contact:TG@fe"
},
{
"path": "list/tvm3u.go",
"chars": 50128,
"preview": "package list\r\n\r\nimport (\r\n\t\"fmt\"\r\n\t\"net/http\"\r\n)\r\n\r\ntype Tvm3u struct {\r\n}\r\n\r\nfunc (t *Tvm3u) GetTvM3u(w http.ResponseWr"
},
{
"path": "list/yylunbo.go",
"chars": 1005,
"preview": "// Package list\r\n// @Time:2023/06/03 20:35\r\n// @File:yylunbo.go\r\n// @SoftWare:Goland\r\n// @Author:feiyang\r\n// @Contact:TG"
},
{
"path": "liveurls/bilibili.go",
"chars": 3423,
"preview": "// Package liveurls\r\n// @Time:2023/02/10 01:03\r\n// @File:bilibili.go\r\n// @SoftWare:Goland\r\n// @Author:feiyang\r\n// @Conta"
},
{
"path": "liveurls/douyin.go",
"chars": 2761,
"preview": "// Package liveurls\r\n// @Time:2023/02/03 01:59\r\n// @File:douyin.go\r\n// @SoftWare:Goland\r\n// @Author:feiyang\r\n// @Contact"
},
{
"path": "liveurls/douyu.go",
"chars": 4178,
"preview": "// Package liveurls\r\n// @Time:2023/02/05 06:36\r\n// @File:douyu.go\r\n// @SoftWare:Goland\r\n// @Author:feiyang\r\n// @Contact:"
},
{
"path": "liveurls/huya.go",
"chars": 8264,
"preview": "// Package liveurls\r\n// @Time:2023/02/05 23:34\r\n// @File:huya.go\r\n// @SoftWare:Goland\r\n// @Author:feiyang\r\n// @Contact:T"
},
{
"path": "liveurls/itv.go",
"chars": 37631,
"preview": "package liveurls\r\n\r\nimport (\r\n\t\"context\"\r\n\t\"io\"\r\n\t\"net\"\r\n\t\"net/http\"\r\n\t\"regexp\"\r\n\t\"strings\"\r\n\t\"sync\"\r\n\t\"time\"\r\n)\r\n\r\ntype"
},
{
"path": "liveurls/youtube.go",
"chars": 3050,
"preview": "// Package liveurls\r\n// @Time:2023/02/17 16:32\r\n// @File:youtube.go\r\n// @SoftWare:Goland\r\n// @Author:Popeye\r\n// @Contact"
},
{
"path": "liveurls/ysptp.go",
"chars": 6869,
"preview": "package liveurls\r\n\r\nimport (\r\n\t\"Golang/utils\"\r\n\t\"encoding/json\"\r\n\t\"io\"\r\n\t\"net/http\"\r\n\t\"regexp\"\r\n\t\"strings\"\r\n\t\"sync\"\r\n\t\"t"
},
{
"path": "liveurls/yy.go",
"chars": 2978,
"preview": "// Package liveurls\r\n// @Time:2023/06/03 05:40\r\n// @File:yy.go\r\n// @SoftWare:Goland\r\n// @Author:feiyang\r\n// @Contact:TG@"
},
{
"path": "package.json",
"chars": 53,
"preview": "{\r\n \"engines\": {\r\n \"node\": \"18.x\"\r\n }\r\n}"
},
{
"path": "utils/http.go",
"chars": 1934,
"preview": "package utils\r\n\r\nimport (\r\n \"os\"\r\n \"fmt\"\r\n \"time\"\r\n \"net/http\"\r\n \"net/url\"\r\n// \"log\"\r\n)\r\n\r\nfunc GetTestVideoUrl(w"
},
{
"path": "utils/jsRun.go",
"chars": 958,
"preview": "// Package utils\n// @Time:2023/08/24 06:36\n// @File:jsRun.go\n// @SoftWare:Goland\n// @Author:feiyang\n// @Contact:TG@feiya"
},
{
"path": "vercel.json",
"chars": 350,
"preview": "{\n \"routes\": [\n {\n \"src\": \"/live/.*\",\n \"dest\": \"/api/live.go\"\n },\n {\n \"src\": \"/yqk/.*\",\n \""
}
]
About this extraction
This page contains the full source code of the papagaye744/iptv-go GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 22 files (138.4 KB), approximately 53.2k tokens, and a symbol index with 69 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.