Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions mytvfree.m3u
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#EXTM3U
#EXTINF:-1 tvg-id="J" tvg-logo="https://github.com/wanglindl/TVlogo/blob/main/img/TVB1.png?raw=true",翡翠台
#KODIPROP:inputstream.adaptive.manifest_type=mpd
#KODIPROP:inputstream.adaptive.license_type=clearkey
#KODIPROP:inputstream.adaptive.license_key=0958b9c657622c465a6205eb2252b8ed:2d2fd7b1661b1e28de38268872b48480
http://edgeware-live.edgeware.tvb.com/__cl/slocalr43/__c/ott_J_hevc/__op/cenc_m/__f/index.mpd?sig=85d1ced19ec0fc82de1d36a478d12f2d&ext_start_limit=1716643735&int_start_limit=1716643735&ts=1716643735&c=850464580
#EXTINF:-1 tvg-id="JUHD" tvg-logo="https://github.com/wanglindl/TVlogo/blob/main/img/TVB1.png?raw=true",翡翠台 4K
#KODIPROP:inputstream.adaptive.manifest_type=mpd
#KODIPROP:inputstream.adaptive.license_type=clearkey
#KODIPROP:inputstream.adaptive.license_key=2c045f5adb26d391cc41cd01f00416fa:fc146771a9b096fc4cb57ffe769861be
http://edgeware-live.edgeware.tvb.com/__cl/slocalr21/__c/ott_JUHD_hevc/__op/cenc_m/__f/index.mpd?sig=024a57ce68f58cf31f7acd370c0d8feb&ext_start_limit=1716643735&int_start_limit=1716643735&ts=1716643735&c=850464580
#EXTINF:-1 tvg-id="B" tvg-logo="https://raw.githubusercontent.com/wanglindl/TVlogo/main/img/TVB3.png",TVBplus
#KODIPROP:inputstream.adaptive.manifest_type=mpd
#KODIPROP:inputstream.adaptive.license_type=clearkey
#KODIPROP:inputstream.adaptive.license_key=56603b65fa1d7383b6ef0e73b9ae69fa:5d9d8e957d2e45d8189a56fe8665aaaa
http://edgeware-live.edgeware.tvb.com/__cl/slocalr87/__c/ott_B_hevc/__op/cenc_m/__f/index.mpd?sig=84ff7917ce573d3cde4defd3ba9681e5&ext_start_limit=1716643735&int_start_limit=1716643735&ts=1716643735&c=850464580
#EXTINF:-1 tvg-id="P" tvg-logo="https://github.com/wanglindl/TVlogo/blob/main/img/TVB1.png?raw=true",明珠台
#KODIPROP:inputstream.adaptive.manifest_type=mpd
#KODIPROP:inputstream.adaptive.license_type=clearkey
#KODIPROP:inputstream.adaptive.license_key=e04facdd91354deee318c674993b74c1:8f97a629de680af93a652c3102b65898
http://edgeware-live.edgeware.tvb.com/__cl/slocalr43/__c/ott_P_hevc/__op/cenc_m/__f/index.mpd?sig=87e86b613152eb982cd9d7f5dc9ae2ef&ext_start_limit=1716643735&int_start_limit=1716643735&ts=1716643735&c=850464580
#EXTINF:-1 tvg-id="CWIN" tvg-logo="",Super Free
#KODIPROP:inputstream.adaptive.manifest_type=mpd
#KODIPROP:inputstream.adaptive.license_type=clearkey
#KODIPROP:inputstream.adaptive.license_key=0737b75ee8906c00bb7bb8f666da72a0:15f515458cdb5107452f943a111cbe89
http://edgeware-live.edgeware.tvb.com/__cl/slocalr21/__c/ott_CWIN_hevc/__op/cenc_m/__f/index.mpd?sig=fb2b741f706f15436c82af4023a8acc6&ext_start_limit=1716643735&int_start_limit=1716643735&ts=1716643735&c=850464580
#EXTINF:-1 tvg-id="TVG" tvg-logo="https://github.com/sparkssssssssss/epg/blob/main/logo/%E9%BB%84%E9%87%91%E7%BF%A1%E7%BF%A0%E5%8F%B0.png?raw=true",黄金翡翠台
#KODIPROP:inputstream.adaptive.manifest_type=mpd
#KODIPROP:inputstream.adaptive.license_type=clearkey
#KODIPROP:inputstream.adaptive.license_key=8fe3db1a24969694ae3447f26473eb9f:5cce95833568b9e322f17c61387b306f
http://edgeware-live.edgeware.tvb.com/__cl/slocalr21/__c/ott_TVG_hevc/__op/cenc_m/__f/index.mpd?sig=d6b72611747b4c6ee393aca5ddce6818&ext_start_limit=1716643735&int_start_limit=1716643735&ts=1716643735&c=850464580
#EXTINF:-1 tvg-id="C" tvg-logo="https://raw.githubusercontent.com/wanglindl/TVlogo/main/img/TVB4.png",无线新闻台
#KODIPROP:inputstream.adaptive.manifest_type=mpd
#KODIPROP:inputstream.adaptive.license_type=clearkey
#KODIPROP:inputstream.adaptive.license_key=90a0bd01d9f6cbb39839cd9b68fc26bc:51546d1f2af0547f0e961995b60a32a1
http://edgeware-live.edgeware.tvb.com/__cl/slocalr65/__c/ott_C_hevc/__op/cenc_m/__f/index.mpd?sig=9c38670549b4d909052dd12980bb4255&ext_start_limit=1716643735&int_start_limit=1716643735&ts=1716643735&c=850464580
#EXTINF:-1 tvg-id="CTVE" tvg-logo="https://github.com/sparkssssssssss/epg/blob/main/logo/%E5%A8%B1%E4%B9%90%E6%96%B0%E9%97%BB%E5%8F%B0.png?raw=true",娱乐新闻台
#KODIPROP:inputstream.adaptive.manifest_type=mpd
#KODIPROP:inputstream.adaptive.license_type=clearkey
#KODIPROP:inputstream.adaptive.license_key=6fa0e47750b5e2fb6adf9b9a0ac431a3:a256220e6c2beaa82f4ca5fba4ec1f95
http://edgeware-live.edgeware.tvb.com/__cl/slocalr43/__c/ott_CTVE_hevc/__op/cenc_m/__f/index.mpd?sig=9ee4e43fe050300ee659ce55740b9483&ext_start_limit=1716643736&int_start_limit=1716643736&ts=1716643736&c=850464580
#EXTINF:-1 tvg-id="PCC" tvg-logo="https://raw.githubusercontent.com/wanglindl/TVlogo/main/img/Phoenix1.png",凤凰卫视中文台
#KODIPROP:inputstream.adaptive.manifest_type=mpd
#KODIPROP:inputstream.adaptive.license_type=clearkey
#KODIPROP:inputstream.adaptive.license_key=7bca0771ba9205edb5d467ce2fdf0162:eb19c7e3cea34dc90645e33f983b15ab
http://edgeware-live.edgeware.tvb.com/__cl/slocalr65/__c/ott_PCC_hevc/__op/cenc_m/__f/index.mpd?sig=c2100586b501fb4f263276911fc0462d&ext_start_limit=1716643736&int_start_limit=1716643736&ts=1716643736&c=850464580
#EXTINF:-1 tvg-id="PIN" tvg-logo="https://raw.githubusercontent.com/wanglindl/TVlogo/main/img/Phoenix2.png",凤凰卫视资讯台
#KODIPROP:inputstream.adaptive.manifest_type=mpd
#KODIPROP:inputstream.adaptive.license_type=clearkey
#KODIPROP:inputstream.adaptive.license_key=83f7d313adfc0a5b978b9efa0421ce25:ecdc8065a46287bfb58e9f765e4eec2b
http://edgeware-live.edgeware.tvb.com/__cl/slocalr65/__c/ott_PIN_hevc/__op/cenc_m/__f/index.mpd?sig=3fe5775e910a789df11cc63b36591bfc&ext_start_limit=1716643736&int_start_limit=1716643736&ts=1716643736&c=850464580
#EXTINF:-1 tvg-id="PHK" tvg-logo="https://raw.githubusercontent.com/wanglindl/TVlogo/main/img/Phoenix3.png",凤凰卫视香港台
#KODIPROP:inputstream.adaptive.manifest_type=mpd
#KODIPROP:inputstream.adaptive.license_type=clearkey
#KODIPROP:inputstream.adaptive.license_key=cde62e1056eb3615dab7a3efd83f5eb4:b8685fbecf772e64154630829cf330a3
http://edgeware-live.edgeware.tvb.com/__cl/slocalr65/__c/ott_PHK_hevc/__op/cenc_m/__f/index.mpd?sig=27b7785f18621a068e6441110d041d4c&ext_start_limit=1716643736&int_start_limit=1716643736&ts=1716643736&c=850464580
#EXTINF:-1 tvg-id="EVT1" tvg-logo="",myTV SUPER直播足球1台
#KODIPROP:inputstream.adaptive.manifest_type=mpd
#KODIPROP:inputstream.adaptive.license_type=clearkey
#KODIPROP:inputstream.adaptive.license_key=e8ca7903e25450d85cb32b3057948522:d5db5c03608f5f6c8a382c6abcb829e4
http://edgeware-live.edgeware.tvb.com/__cl/slocalr21/__c/ott_EVT1_hevc/__op/cenc_m/__f/index.mpd?sig=98d9bdd9163a1733578bf26a12f13f42&ext_start_limit=1716643736&int_start_limit=1716643736&ts=1716643736&c=850464580
144 changes: 144 additions & 0 deletions mytvsuper.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
<?php

$CHANNEL_LIST = array(
'J' => array(
'name' => '翡翠台',
'license' => '0958b9c657622c465a6205eb2252b8ed:2d2fd7b1661b1e28de38268872b48480',
'logo' => 'https://github.com/wanglindl/TVlogo/blob/main/img/TVB1.png?raw=true'
),
'JUHD' => array(
'name' => '翡翠台 4K',
'license' => '2c045f5adb26d391cc41cd01f00416fa:fc146771a9b096fc4cb57ffe769861be',
'logo' => 'https://github.com/wanglindl/TVlogo/blob/main/img/TVB1.png?raw=true'
),
'B' => array(
'name' => 'TVBplus',
'license' => '56603b65fa1d7383b6ef0e73b9ae69fa:5d9d8e957d2e45d8189a56fe8665aaaa',
'logo' => 'https://raw.githubusercontent.com/wanglindl/TVlogo/main/img/TVB3.png'
),
'P' => array(
'name' => '明珠台',
'license' => 'e04facdd91354deee318c674993b74c1:8f97a629de680af93a652c3102b65898',
'logo' => 'https://github.com/wanglindl/TVlogo/blob/main/img/TVB1.png?raw=true'
),
'CWIN' => array(
'name' => 'Super Free',
'license' => '0737b75ee8906c00bb7bb8f666da72a0:15f515458cdb5107452f943a111cbe89',
'logo' => ''
),
'TVG' => array(
'name' => '黄金翡翠台',
'license' => '8fe3db1a24969694ae3447f26473eb9f:5cce95833568b9e322f17c61387b306f',
'logo' => 'https://github.com/sparkssssssssss/epg/blob/main/logo/%E9%BB%84%E9%87%91%E7%BF%A1%E7%BF%A0%E5%8F%B0.png?raw=true'
),
'C' => array(
'name' => '无线新闻台',
'license' => '90a0bd01d9f6cbb39839cd9b68fc26bc:51546d1f2af0547f0e961995b60a32a1',
'logo' => 'https://raw.githubusercontent.com/wanglindl/TVlogo/main/img/TVB4.png'
),
'CTVE' => array(
'name' => '娱乐新闻台',
'license' => '6fa0e47750b5e2fb6adf9b9a0ac431a3:a256220e6c2beaa82f4ca5fba4ec1f95',
'logo' => 'https://github.com/sparkssssssssss/epg/blob/main/logo/%E5%A8%B1%E4%B9%90%E6%96%B0%E9%97%BB%E5%8F%B0.png?raw=true'
),
'PCC' => array(
'name' => '凤凰卫视中文台',
'license' => '7bca0771ba9205edb5d467ce2fdf0162:eb19c7e3cea34dc90645e33f983b15ab',
'logo' => 'https://raw.githubusercontent.com/wanglindl/TVlogo/main/img/Phoenix1.png'
),
'PIN' => array(
'name' => '凤凰卫视资讯台',
'license' => '83f7d313adfc0a5b978b9efa0421ce25:ecdc8065a46287bfb58e9f765e4eec2b',
'logo' => 'https://raw.githubusercontent.com/wanglindl/TVlogo/main/img/Phoenix2.png'
),
'PHK' => array(
'name' => '凤凰卫视香港台',
'license' => 'cde62e1056eb3615dab7a3efd83f5eb4:b8685fbecf772e64154630829cf330a3',
'logo' => 'https://raw.githubusercontent.com/wanglindl/TVlogo/main/img/Phoenix3.png'
),
'EVT1' => array(
'name' => 'myTV SUPER直播足球1台',
'license' => 'e8ca7903e25450d85cb32b3057948522:d5db5c03608f5f6c8a382c6abcb829e4',
'logo' => ''
)
);

function get_mytvsuper($channel) {
global $CHANNEL_LIST;

if (!array_key_exists($channel, $CHANNEL_LIST)) {
return '频道代号错误';
}

$api_token = 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJib3NzX2lkIjoiODUwNDY0NTgwIiwiZGV2aWNlX3Rva2VuIjoiWHp6anMzYTVKTms2TFpnZmJQeFZHR2QzIiwiZGV2aWNlX2lkIjoiTldGalptSmxNREF0TkRJNU5TMDBaakV3TFRrNFl6QXRNbUkwT0RCbFpXRTJaVEV3IiwiZGV2aWNlX3R5cGUiOiJ3ZWIiLCJkZXZpY2Vfb3MiOiJicm93c2VyIiwiZHJtX2lkIjoiTldGalptSmxNREF0TkRJNU5TMDBaakV3TFRrNFl6QXRNbUkwT0RCbFpXRTJaVEV3IiwiZXh0cmEiOnsicHJvZmlsZV9pZCI6MX0sImlhdCI6MTcwOTgwNTA3NywiZXhwIjoxNzA5ODA4Njc3fQ.XG-C6gWxLgbBRQ3ttKn68AKMQLOg6SxTpbmHxXl_qI2dbjd1eFFmwB9kD1yd2N_X8HxLPBwJukD4lygIKxbBGrQQDY_1vNd76TldllaeE2BC3fUtc-kAFOU4JwbUkfFYsWVm3v2JP-YGM2GGlhFqN_3170WDAi2Gq-R0tZckeFNWk7jOSShqkE0E7L3eqJ09sDG76R-PCbdpnCIxaY_NXtoYRfIoVQZA9QysExUyO6hQGUxLaTvJDtflX_ZM3OiqTMndHp1p0cDsINnpFokD6Yby5XS18RjQ-Dn1XJznj7-sRjlaGgyIIBoJjxsR2oD5S8teA5S6x7w3Dv6uTO3bWVV9J60E6jguGVqKnSYJ4Rx8A1TgyUTT_g57key6UFIiEhkHYqk7s3H01V-lHffNp5zDo9UrCdaO6maW_ZeA85ohR6P1PMh9EakQ5A-vok60s2oqyokKHfyrQvcodsI-MTC9mKegjJzgV2-HBgyylyj6B2ewvE4icDD25UdspWgbc33NrRpe_kgPxgVKF4cgKCD-S1AT3WrOaqKnPfPvhqmlciwlpZrUqZg09BqcazWPoyWAp2nqf93H6tlDqMrtAQgvft3Nd8-cM7jYx-WvzqRrCRpZ8vRSv11UdezKzR2Jm4H64KTWbs3GxB5vboZaeypdEzQW6PipPpftqRnNMQU'; // 请自行获取
$headers = array(
'Accept: application/json',
'Authorization: Bearer ' . $api_token,
'Accept-Language: zh-CN,zh-Hans;q=0.9',
'Host: user-api.mytvsuper.com',
'Origin: https://www.mytvsuper.com',
'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.5.2 Safari/605.1.15',
'Referer: https://www.mytvsuper.com/',
'X-Forwarded-For: 210.6.4.148' // 香港原生IP 210.6.4.148
);

$params = array(
'platform' => 'android_tv',
'network_code' => $channel
);

$url = 'https://user-api.mytvsuper.com/v1/channel/checkout?' . http_build_query($params);
$context = stream_context_create(array('http' => array('header' => implode("\r\n", $headers))));
$response = file_get_contents($url, false, $context);

if ($response === false) {
return '请求失败';
}

$response_json = json_decode($response, true);
$profiles = $response_json['profiles'];

$play_url = '';
foreach ($profiles as $profile) {
if ($profile['quality'] === 'high') {
$play_url = $profile['streaming_path'];
break;
}
}

if (empty($play_url)) {
return '未找到播放地址';
}

$play_url = explode('&p=', $play_url)[0];

$license_key =$CHANNEL_LIST[ $channel]['license'];
$channel_name =$CHANNEL_LIST[ $channel]['name'];
$channel_logo =$CHANNEL_LIST[ $channel]['logo'];
$m3u_content = "#EXTINF:-1 tvg-id=\"" .$channel . "\" tvg-logo=\"" .$channel_logo . "\"," .$channel_name . "\n";
$m3u_content .= "#KODIPROP:inputstream.adaptive.manifest_type=mpd\n";
$m3u_content .= "#KODIPROP:inputstream.adaptive.license_type=clearkey\n";
$m3u_content .= "#KODIPROP:inputstream.adaptive.license_key=" .$license_key . "\n";
$m3u_content .=$play_url . "\n";

return $m3u_content;
}

// 创建或打开文件用于写入
$m3u_file = fopen('mytvfree.m3u', 'w');

// 写入 M3U 文件的头部
fwrite($m3u_file, "#EXTM3U\n");

// 遍历所有频道并写入每个频道的 M3U 内容
foreach ($CHANNEL_LIST as $channel_code => $channel_info) {
$m3u_content = get_mytvsuper($channel_code);
fwrite($m3u_file, $m3u_content);
}

// 关闭文件
fclose($m3u_file);

echo "所有频道的 M3U 播放列表已生成并保存为 'mytvfree.m3u'。";

?>