Skip to content

Commit

Permalink
Merge pull request #353 from Guovin/dev
Browse files Browse the repository at this point in the history
Release:v1.4.8
  • Loading branch information
Guovin authored Sep 27, 2024
2 parents b7c98cd + aec5500 commit 92515e9
Show file tree
Hide file tree
Showing 14 changed files with 190 additions and 15 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# 更新日志(Changelog)

## v1.4.8

### 2024/09/27

- 默认模板增加部分频道:咪咕直播、央视付费频道、电影频道、港澳台、地方频道等
- 订阅源增加默认订阅地址
- 优化订阅源、在线搜索测速效率
- 增加汕头频道组播

- Add some channels to the default template: Migu Live, CCTV Pay Channels, Movie Channel, Hong Kong and Macau Channels, Local Channels, etc
- Add default subscription addresses to the subscription source
- Optimize the efficiency of subscription source and online search speed tests
- Add Shantou channel multicast

## v1.4.7

### 2024/09/26
Expand Down
122 changes: 119 additions & 3 deletions config/demo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,19 @@
广东新闻
广东卫视
大湾区卫视
广州影视
广州竞赛
江门综合
江门侨乡生活
佛山综合
深圳卫视
汕头综合
汕头经济
汕头文旅
茂名综合
茂名公共

央视频道,#genre#
📺央视频道,#genre#
CCTV-1
CCTV-2
CCTV-3
Expand All @@ -28,8 +35,26 @@ CCTV-14
CCTV-15
CCTV-16
CCTV-17
CETV1
CETV2
CETV4
CETV5

卫视频道,#genre#
央视付费频道,#genre#
文化精品
央视台球
风云音乐
第一剧场
风云剧场
怀旧剧场
女性时尚
高尔夫网球
风云足球
电视指南
世界地理
兵器科技

📡卫视频道,#genre#
广东卫视
香港卫视
浙江卫视
Expand Down Expand Up @@ -67,8 +92,99 @@ CCTV-17

港·澳·台,#genre#
翡翠台
明珠台
凤凰中文
凤凰资讯
凤凰香港
凤凰卫视
TVBS亚洲
香港卫视
香港卫视
纬来体育
纬来育乐
J2
Viutv
三立台湾
无线新闻
三立新闻
东森综合
东森超视
东森电影
Now剧集
Now华剧
靖天资讯
星卫娱乐
卫视卡式

🎬电影频道,#genre#
CHC家庭影院
CHC动作电影
CHC高清电影
淘剧场
淘娱乐
淘电影
NewTV惊悚悬疑
NewTV动作电影
黑莓电影
纬来电影
靖天映画
靖天戏剧
星卫娱乐
艾尔达娱乐
精选频道1
经典电影
IPTV经典电影
天映经典
无线星河
星空卫视
私人影院
东森电影
龙祥电影
东森洋片
东森超视

咪咕直播,#genre#
咪咕直播1
咪咕直播2
咪咕直播3
咪咕直播4
咪咕直播5
咪咕直播6
咪咕直播7
咪咕直播8
咪咕直播9
咪咕直播10
咪咕直播11
咪咕直播12
咪咕直播13
咪咕直播14
咪咕直播15
咪咕直播16
咪咕直播17
咪咕直播18
咪咕直播19
咪咕直播20
咪咕直播21
咪咕直播22
咪咕直播23
咪咕直播24
咪咕直播25
咪咕直播26
咪咕直播27
咪咕直播28
咪咕直播29
咪咕直播30
咪咕直播31
咪咕直播32
咪咕直播33
咪咕直播34
咪咕直播35
咪咕直播36
咪咕直播37
咪咕直播38
咪咕直播39
咪咕直播40
咪咕直播41
咪咕直播42
咪咕直播43
咪咕直播44
咪咕直播45
1 change: 0 additions & 1 deletion config/rtp/北京_电信.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ IPTV少儿动画,rtp://225.1.8.207:9000
鉴赏,rtp://225.1.8.242:4120
墨宝,rtp://225.1.8.243:4120
光影,rtp://225.1.8.244:4120
台球,rtp://225.1.8.245:4120
爱生活,rtp://225.1.8.246:4120
武术,rtp://225.1.8.247:4120
高网,rtp://225.1.8.248:4120
Expand Down
1 change: 0 additions & 1 deletion config/rtp/北京_联通.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ CETV4,rtp://239.3.1.56:4120
军旅剧场,rtp://239.3.1.68:4120
动画,rtp://239.3.1.80:4120
古装剧场,rtp://239.3.1.69:4120
台球,rtp://239.3.1.85:4120
嘉佳卡通,rtp://239.3.1.147:9268
国学,rtp://239.3.1.77:4120
城市剧场,rtp://239.3.1.67:4120
Expand Down
11 changes: 7 additions & 4 deletions config/rtp/广东_电信.txt
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,14 @@ HZTV-2高清,rtp://239.77.1.233:5146
茂名公共,rtp://239.77.0.205:5146
茂名公共高清,rtp://239.77.0.207:5146
汕头综合,rtp://239.253.43.30:5146
汕头综合,rtp://239.77.1.130:5146
汕头综合高清,rtp://239.253.43.45:5146
汕头经济生活,rtp://239.253.43.43:5146
汕头经济生活高清,rtp://239.253.43.46:5146
汕头文旅体育,rtp://239.253.43.44:5146
汕头文旅体育高清,rtp://239.253.43.47:5146
汕头经济,rtp://239.77.1.131:5146
汕头经济,rtp://239.253.43.43:5146
汕头经济高清,rtp://239.253.43.46:5146
汕头文旅,rtp://239.77.1.132:5146
汕头文旅,rtp://239.253.43.44:5146
汕头文旅高清,rtp://239.253.43.47:5146
佛山公共,rtp://239.253.43.48:5146
佛山公共高清,rtp://239.253.43.53:5146
佛山南海,rtp://239.77.0.236:5146
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ https://mirror.ghproxy.com/raw.githubusercontent.com/您的github用户名/仓

### 1. Star

在我的仓库首页点击收藏该项目(您的 Star 是我持续更新的动力)
在我的仓库首页(https://github.com/Guovin/TV)点击收藏该项目(您的 Star 是我持续更新的动力)
![Star](./images/star.png 'Star')

### 2. Watch
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ Since this project will continue to iterate and improve, if you want to get the
### 1. Star
Click on the star button at the homepage of my repository to favorite this project (Your star is the motivation for me to keep updating).
Click on the star button at the homepage of my repository (https://github.com/Guovin/TV) to favorite this project (Your star is the motivation for me to keep updating).
![Star](./images/star.png 'Star')
### 2. Watch
Expand Down
4 changes: 3 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,9 @@ async def main(self):
get_channel_data_cache_with_compare(
channel_data_cache, self.channel_data
)
with open(resource_path("output/result_cache.pkl"), "wb") as file:
with open(
resource_path("output/result_cache.pkl", persistent=True), "wb"
) as file:
pickle.dump(channel_data_cache, file)
if open_sort:
user_log_file = "output/" + (
Expand Down
Binary file modified updates/fofa/fofa_hotel_region_result.pkl
Binary file not shown.
Binary file modified updates/fofa/fofa_multicast_region_result.pkl
Binary file not shown.
8 changes: 7 additions & 1 deletion updates/online_search/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@
get_results_from_soup,
get_results_from_soup_requests,
)
from utils.tools import check_url_by_patterns, get_pbar_remaining, get_soup
from utils.tools import (
check_url_by_patterns,
get_pbar_remaining,
get_soup,
format_url_with_cache,
)
from utils.config import config
from updates.proxy import get_proxy, get_proxy_next
from time import time
Expand Down Expand Up @@ -161,6 +166,7 @@ def process_channel_by_online_search(name):
for result in results:
url, date, resolution = result
if url and check_url_by_patterns(url):
url = format_url_with_cache(url)
info_list.append((url, date, resolution))
break
else:
Expand Down
4 changes: 3 additions & 1 deletion updates/subscribe/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from utils.retry import retry_func
import re
from utils.channel import format_channel_name
from utils.tools import merge_objects, get_pbar_remaining
from utils.tools import merge_objects, get_pbar_remaining, format_url_with_cache
from concurrent.futures import ThreadPoolExecutor
from collections import defaultdict

Expand Down Expand Up @@ -83,6 +83,8 @@ def process_subscribe_channels(subscribe_info):
url = matcher.group(2).strip()
if with_cache:
url = f"{url}$cache:{subscribe_url}"
else:
url = format_url_with_cache(url)
value = url if multicast else (url, None, resolution)
name = format_channel_name(key)
if name in channels:
Expand Down
34 changes: 34 additions & 0 deletions utils/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,3 +336,37 @@ def process_nested_dict(data, seen, flag=None):
process_nested_dict(value, seen, flag)
elif isinstance(value, list):
data[key] = remove_duplicates_from_tuple_list(value, seen, flag)


ip_pattern = re.compile(
r"""
(
(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}) # IPv4
|([a-zA-Z0-9.-]+\.[a-zA-Z]{2,}) # Domain
|(\[([0-9a-fA-F:]+)\]) # IPv6
)
(?::(\d+))? # Port
""",
re.VERBOSE,
)


def get_ip(url):
"""
Get the IP address with flags
"""
matcher = ip_pattern.search(url)
if matcher:
return matcher.group(1)
return None


def format_url_with_cache(url):
"""
Format the URL with cache
"""
ip = get_ip(url)
if ip:
return f"{url}$cache:{ip}"
else:
return url
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version": "1.4.7",
"version": "1.4.8",
"name": "电视直播源更新工具"
}

0 comments on commit 92515e9

Please sign in to comment.