Skip to content

Commit

Permalink
release:v1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Guovin committed Jul 1, 2024
1 parent e90b964 commit 290dd62
Show file tree
Hide file tree
Showing 15 changed files with 400 additions and 139 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# 更新日志(Changelog)

## v1.3.0

### 2024/7/1

- 新增更新结果页面服务(ip:8000)(Add new update results page service (ip:8000))
- 新增支持 Docker 运行,并支持定时自动更新(Added support for Docker running and automatic updates)
- 修复在线查询更新,增加随机代理、失败重试,提高获取结果成功率(Fixed online query update, added random proxy, increased failure retry, and improved the success rate of getting results)
- 更换使用阿里云镜像源(Switched to use Alibaba Cloud mirror source)
- 增加更新开关配置:open_update(Add update switch configuration: open_update)
- 更新说明文档(Update documentation)

## v1.2.4

### 2024/6/21
Expand Down
19 changes: 15 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,21 @@ WORKDIR /app

COPY . /app

# RUN pip install --trusted-host pypi.python.org Flask
RUN pip install -i https://mirrors.aliyun.com/pypi/simple pipenv

EXPOSE 80
RUN pipenv install

ENV NAME World
RUN sed -i 's@deb.debian.org@mirrors.aliyun.com@g' /etc/apt/sources.list \
&& sed -i 's@security.debian.org@mirrors.aliyun.com@g' /etc/apt/sources.list

CMD ["python", "./main.py"]
RUN apt-get update && apt-get install -y chromium chromium-driver cron

RUN (crontab -l 2>/dev/null; echo "0 0 * * * cd /app && pipenv run python main.py scheduled_task") | crontab -

EXPOSE 8000

COPY entrypoint.sh /entrypoint.sh

RUN chmod +x /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
5 changes: 3 additions & 2 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
name = "aliyun"
url = "https://mirrors.aliyun.com/pypi/simple"
verify_ssl = true

[scripts]
Expand All @@ -21,6 +21,7 @@ async-timeout = "*"
pyinstaller = "*"
aiohttp = "*"
flask = "*"
gunicorn = "*"

[requires]
python_version = "3.8"
145 changes: 130 additions & 15 deletions Pipfile.lock

Large diffs are not rendered by default.

47 changes: 36 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,50 @@
## 特点

- 自定义模板,生成您想要的频道分类与频道顺序
- 接口验效,过滤无效接口
- 按响应时间、分辨率综合权衡排序
- 定时执行,北京时间每日 8:00 执行更新一次
- 可设置重点关注频道,单独配置获取分页的数量
- 分页结果获取(可配置页数、接口数量)
- 保证更新时效性,配置获取最近时间范围内更新的接口
- 可过滤 ipv4、ipv6 接口
- 黑名单功能:接口域名与关键字
- 支持多种获取源方式:线上检索、组播源、订阅源
- 支持多种获取源方式:线上检索、组播源、酒店源、订阅源
- 接口测速验效,响应时间、分辨率优先级,过滤无效接口
- 定时执行,北京时间每日 8:00 执行更新
- 支持多种运行方式:工作流、命令行、界面软件、Docker
- 更多功能请见[配置参数](./docs/config.md)

## 配置

[配置参数](./docs/config.md)

## 快速上手

[更新工具软件](https://github.com/Guovin/TV/releases)
### 方式一:命令行更新

有关详细教程,请查看[快速上手](./docs/tutorial.md)
```python
pip3 install pipenv
pipenv install
pipenv run build
```

### 方式二:界面软件更新

```python
1. 下载[更新工具软件](https://github.com/Guovin/TV/releases),打开软件,点击更新,即可完成更新

2. 或者在项目目录下运行以下命令,即可打开界面软件:
pipenv run ui
```

### 方式三:Docker 更新

```bash
1. 拉取镜像:docker pull guovern/tv-update:latest
2. 运行容器:docker run -d -p 8000:8000 tv-update
3. 访问(域名:8000)查看更新结果
```

#### 注:方式一至三更新完成后的结果文件链接:http://本地 ip:8000

### 方式四:工作流更新

Fork 本项目并开启工作流更新

[更多详细教程](./docs/tutorial.md)

如果您不想折腾,刚好我的配置符合您的需求,可以使用以下链接:

Expand Down
51 changes: 38 additions & 13 deletions README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,51 @@ Customize channel menus and automatically obtain and update the latest live sour

## Features

- Customize templates to generate the channel categories and order you want
- Interface validation to filter out invalid interfaces
- Comprehensive sorting based on response time and resolution
- Scheduled execution, updates every day at 8:00 am Beijing time
- Set up key focus channels and configure the number of pages fetched separately
- Pagination results retrieval (configurable number of pages and interfaces)
- Ensure update timeliness, configure to retrieve interfaces updated within a recent time range
- Can filter ipv4, ipv6 interfaces
- Blacklist feature: Interface domain and keywords
- Supports multiple ways of obtaining sources: online search, multicast source, subscription source
- Custom templates for creating desired channel categories and order
- Supports multiple source acquisition methods: online search, multicast source, hotel source, subscription source
- Interface speed testing and verification, with priority on response time and resolution, filtering out ineffective interfaces
- Scheduled execution at 8:00 AM Beijing time daily
- Supports various execution methods: workflows, command line, GUI software, Docker
- For more features, see [Config parameter](./docs/config_en.md)

## Config

[Config parameter](./docs/config_en.md]
[Config parameter](./docs/config_en.md)

## Quick Start

[Update tool software](https://github.com/Guovin/TV/releases)
### Method 1: Command Line Update

For detailed tutorial, please see [Quick Start](./docs/tutorial_en.md)
```python
pip3 install pipenv
pipenv install
pipenv run build
```

### Method 2: GUI Software Update

```python
1. Download [Update tool software](https://github.com/Guovin/TV/releases), open the software, click update to complete the update

2. Or run the following command in the project directory to open the GUI software:
pipenv run ui
```

### Method 3: Docker Update

```bash
1. Pull the image: docker pull guovern/tv-update:latest
2. Run the container: docker run -d -p 8000:8000 tv-update
3. Access (domain:8000) to check the update results
```

#### Note: Link to the result file after updates of methods one to three: http://local ip:8000

### Method 4: Workflow Update

Fork this project and enable workflow updates

[More detailed tutorial](./docs/tutorial_en.md)

If you don't want to bother, and my configuration just meets your needs, you can use the following links:

Expand Down
1 change: 1 addition & 0 deletions docs/config.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
| 配置项 | 默认值 | 描述 |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| open_update | True | 是否开启更新 |
| source_file | "demo.txt" | 模板文件名称 |
| final_file | "result.txt" | 生成文件名称 |
| favorite_list | ["广东珠江","CCTV-1","CCTV-5","CCTV-5+","CCTV-13","广东体育","广东卫视","大湾区卫视","浙江卫视","湖南卫视","翡翠台"] | 关注频道名称列表(仅用于与常规频道区分,自定义获取分页数量) |
Expand Down
1 change: 1 addition & 0 deletions docs/config_en.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
| Configuration Item | Default Value | Description |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| open_update | True | Enable update |
| source_file | "demo.txt" | Template file name |
| final_file | "result.txt" | Generated file name |
| favorite_list | ["广东珠江","CCTV-1","CCTV-5","CCTV-5+","CCTV-13","广东体育","广东卫视","大湾区卫视","浙江卫视","湖南卫视","翡翠台"] | List of favorite channel names (used only to distinguish from regular channels, custom page retrieval quantity) |
Expand Down
67 changes: 35 additions & 32 deletions docs/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,47 +55,50 @@
3. 粘贴默认模板,修改 source_file = "user_demo.txt";final_file = "user_result.txt"
4. 点击 Commit changes...进行保存

按照您的需要适当调整配置,以下是默认配置说明
| 配置项 | 默认值 | 描述 |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
| source_file | "demo.txt" | 模板文件名称 |
| final_file | "result.txt" | 生成文件名称 |
| favorite_list | ["广东珠江","CCTV-1","CCTV-5","CCTV-5+","CCTV-13","广东体育","广东卫视","大湾区卫视","浙江卫视","湖南卫视","翡翠台"] | 关注频道名称列表(仅用于与常规频道区分,自定义获取分页数量) |
| open_online_search | False | 开启线上检索源功能 |
| favorite_page_num | 5 | 关注频道获取分页数量 |
| default_page_num | 3 | 常规频道获取分页数量 |
| urls_limit | 10 | 单个频道接口数量 |
| open_sort | True | 开启排序功能(响应速度、日期、分辨率),若更执行时间较长可关闭此功能 |
| response_time_weight | 0.5 | 响应时间权重值(所有权重值总和应为 1) |
| resolution_weight | 0.5 | 分辨率权重值 (所有权重值总和应为 1) |
| recent_days | 30 | 获取最近时间范围内更新的接口(单位天),适当减小可避免出现匹配问题 |
| ipv_type | "ipv4" | 生成结果中接口的类型,可选值:"ipv4"、"ipv6"、"all" |
| domain_blacklist | ["epg.pw"] | 接口域名黑名单,用于过滤低质量含广告类域名的接口 |
| url_keywords_blacklist | [] | 接口关键字黑名单,用于过滤含特定字符的接口 |
| open_subscribe | True | 开启订阅源功能 |
| subscribe_urls | ["https://m3u.ibert.me/txt/fmml_dv6.txt",<br>"https://m3u.ibert.me/txt/o_cn.txt",<br>"https://m3u.ibert.me/txt/j_iptv.txt"] | 订阅源列表 |
| open_multicast | True | 开启组播源功能 |
| region_list | ["all"] | 组播源地区列表,[更多地区](./fofa_map.py),"all"表示所有地区 |

## 步骤四:本地运行更新(推荐,稳定,支持大量频道更新)

### 1. 安装 Python
按照您的需要适当调整配置,以下是默认配置说明:
[配置参数](./docs/config.md)

请至官方下载并安装 Python,安装时请选择将 Python 添加到系统环境变量 Path 中

### 2. 运行更新
## 步骤四:运行更新

项目目录下打开终端 CMD 依次运行以下命令:
### 方式一:命令行更新

```python
1. 安装 Python
请至官方下载并安装 Python,安装时请选择将 Python 添加到系统环境变量 Path 中

2. 运行更新
项目目录下打开终端 CMD 依次运行以下命令:
pip3 install pipenv
pipenv install
pipenv run build
```

### 3. 更新文件至仓库
### 方式二:界面软件更新

```python
1. 下载[更新工具软件](https://github.com/Guovin/TV/releases),打开软件,点击更新,即可完成更新

2. 或者在项目目录下运行以下命令,即可打开界面软件:
pipenv run ui
```

### 方式三:Docker 更新

```bash
1. 拉取镜像:docker pull guovern/tv-update:latest
2. 运行容器:docker run -d -p 8000:8000 tv-update
3. 访问(域名:8000)查看更新结果
```

#### 注:方式一至三更新完成后的结果文件链接:http://本地 ip:8000

### 方式四:工作流更新

请见步骤六

### 上传更新文件至仓库(可选)

接口更新完成后,将 user_result.txt 上传至个人仓库,即可完成更新
如果您没有自己的域名地址,接口更新完成后,将 user_result.txt 上传至个人仓库,即可使用
![用户名与仓库名称](./images/rep-info.png '用户名与仓库名称')
https://mirror.ghproxy.com/raw.githubusercontent.com/您的github用户名/仓库名称(对应上述Fork创建时的TV)/master/user_result.txt

Expand All @@ -120,7 +123,7 @@ https://mirror.ghproxy.com/raw.githubusercontent.com/您的github用户名/仓

## 以下内容请谨慎使用,如果您有大量的频道需要更新,请使用本地更新,勿使用自动更新,配置不当可能导致账户或工作流封禁!

## 步骤六:开启自动更新(仅适合少量频道更新)
## 步骤六:开启工作流自动更新

如果您的模板和配置修改没有问题的话,这时就可以配置 Actions 来实现自动更新啦

Expand Down
Loading

0 comments on commit 290dd62

Please sign in to comment.