This commit is contained in:
guorong.zheng 2024-11-22 18:30:08 +08:00
parent 81afb616c8
commit e8616c1156
13 changed files with 1331 additions and 332 deletions

View file

@ -9,7 +9,6 @@ on:
- master
- dev
- gd
- gd-test
jobs:
push:
runs-on: ${{ matrix.operating-system }}
@ -40,16 +39,16 @@ jobs:
except:
open_driver = False
print(open_driver)')" >> $GITHUB_ENV
- name: Check open_ffmpeg config
id: check_ffmpeg
run: |
echo "OPEN_FFMPEG=$(python -c '
try:
from utils.config import config
open_ffmpeg = config.open_ffmpeg
except:
open_ffmpeg = False
print(open_ffmpeg)')" >> $GITHUB_ENV
# - name: Check open_ffmpeg config
# id: check_ffmpeg
# run: |
# echo "OPEN_FFMPEG=$(python -c '
# try:
# from utils.config import config
# open_ffmpeg = config.open_ffmpeg
# except:
# open_ffmpeg = False
# print(open_ffmpeg)')" >> $GITHUB_ENV
- name: Set up Chrome
if: env.OPEN_DRIVER == 'True' || env.OPEN_DRIVER == 'true'
uses: browser-actions/setup-chrome@latest
@ -58,13 +57,16 @@ jobs:
- name: Download chrome driver
if: env.OPEN_DRIVER == 'True' || env.OPEN_DRIVER == 'true'
uses: nanasess/setup-chromedriver@master
- name: Install FFmpeg
if: env.OPEN_FFMPEG == 'True' || env.OPEN_FFMPEG == 'true'
run: sudo apt-get update && sudo apt-get install -y ffmpeg
# - name: Install FFmpeg
# if: env.OPEN_FFMPEG == 'True' || env.OPEN_FFMPEG == 'true'
# run: sudo apt-get update && sudo apt-get install -y ffmpeg
- name: Install pipenv
run: pip3 install --user pipenv
- name: Install dependecies
run: pipenv --python 3.13 && pipenv install
- name: Install selenium
if: env.OPEN_DRIVER == 'True' || env.OPEN_DRIVER == 'true'
run: pipenv install selenium
- name: Update
run: pipenv run dev
- name: Commit and push if changed

View file

@ -22,10 +22,7 @@ jobs:
run: pip3 install --user pipenv
- name: Install dependencies with pipenv
run: pipenv --python 3.13 && pipenv install
- name: Install PyInstaller
run: pipenv install pyinstaller
run: pipenv --python 3.13 && pipenv install --dev
- name: Build the application
run: pipenv run pyinstaller tkinter_ui/tkinter_ui.spec

View file

@ -59,7 +59,7 @@
- ✨ 新增频道接口白名单:不参与测速,永远保留在结果最前面(#470
使用方法:
1. 模板频道接口地址后添加$!即可实现(如:广东珠江,http://xxx.m3u$!
2. 额外信息补充(如:广东珠江,http://xxx.m3u$!额外信息 更多接口白名单请至https://github.com/Guovin/TV/issues/514 讨论
2. 额外信息补充(如:广东珠江,http://xxx.m3u$!额外信息 更多接口白名单请至https://github.com/Guovin/GTV/issues/514 讨论
- ✨ 新增 🈳 无结果频道分类:无结果频道默认归类至该底部分类下(#473
- ✨ 接口地址增加来源类型说明
- ✨ 默认模板增加广东民生(#481、广州综合#504
@ -78,7 +78,7 @@
- ✨ Added channel interface whitelist: Not participating in speed testing, always kept at the very front of the results. (#470)
Usage:
1. Add $! after the template channel interface address (e.g., Guangdong Pearl River, http://xxx.m3u$!).
2. Additional information can be appended (e.g., Guangdong Pearl River, http://xxx.m3u$! Additional Information) (#470). For more interface whitelists, please discuss at https://github.com/Guovin/TV/issues/514.
2. Additional information can be appended (e.g., Guangdong Pearl River, http://xxx.m3u$! Additional Information) (#470). For more interface whitelists, please discuss at https://github.com/Guovin/GTV/issues/514.
- ✨ Added 🈳 No Results Channel Category: Channels without results are categorized under this bottom category by default (#473).
- ✨ Interface addresses now include source type descriptions.
- ✨ Default templates now include Guangdong People's Livelihood (#481) and Guangzhou Comprehensive (#504).

View file

@ -1,15 +1,27 @@
FROM python:3.8-slim
FROM python:3.13 AS builder
ARG APP_WORKDIR=/tv
ARG APP_WORKDIR=/gtv
ARG LITE=false
ENV APP_WORKDIR=$APP_WORKDIR
WORKDIR $APP_WORKDIR
COPY . $APP_WORKDIR
RUN pip install -i https://mirrors.aliyun.com/pypi/simple pipenv \
&& if [ "$LITE" = true ]; then pipenv install; else pipenv install && pipenv install selenium; fi
FROM python:3.13-slim
ARG APP_WORKDIR=/gtv
ARG LITE=false
ENV APP_WORKDIR=$APP_WORKDIR
WORKDIR $APP_WORKDIR
RUN pip install -i https://mirrors.aliyun.com/pypi/simple pipenv \
&& pipenv install
COPY --from=builder $APP_WORKDIR $APP_WORKDIR
RUN echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware\n \
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware\n \
@ -22,19 +34,9 @@ RUN echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security/ bookworm-security main contrib non-free non-free-firmware\n" \
> /etc/apt/sources.list
RUN apt-get update && apt-get install -y --no-install-recommends \
cron \
ffmpeg
ARG INSTALL_CHROMIUM=false
RUN if [ "$INSTALL_CHROMIUM" = "true" ]; then \
apt-get install -y --no-install-recommends \
chromium \
chromium-driver; \
fi
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y --no-install-recommends cron \
&& if [ "$LITE" = false ]; then apt-get install -y --no-install-recommends chromium chromium-driver; fi \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
RUN (crontab -l ; \
echo "0 22 * * * cd $APP_WORKDIR && /usr/local/bin/pipenv run python main.py scheduled_task"; \
@ -42,10 +44,8 @@ RUN (crontab -l ; \
EXPOSE 8000
COPY entrypoint.sh /tv_entrypoint.sh
COPY entrypoint.sh /gtv_entrypoint.sh
COPY config /tv_config
RUN chmod +x /gtv_entrypoint.sh
RUN chmod +x /tv_entrypoint.sh
ENTRYPOINT /tv_entrypoint.sh
ENTRYPOINT ["/gtv_entrypoint.sh"]

22
Pipfile
View file

@ -6,14 +6,13 @@ verify_ssl = true
[scripts]
dev = "python main.py"
ui = "python tkinter_ui/tkinter_ui.py"
multicast_tmp = "python updates/multicast/update_tmp.py"
docker_build_driver = "docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v8 --build-arg APP_WORKDIR=/tv-driver --build-arg INSTALL_CHROMIUM=true -t guovern/tv-driver . --push"
docker_build_requests = "docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v8 --build-arg APP_WORKDIR=/tv-requests -t guovern/tv-requests . --push"
docker_run = "docker run -v config:/gtv/config -v output:/gtv/output -d -p 8000:8000 guovern/gtv"
docker_run_lite = "docker run -v config:/gtv-lite/config -v output:/gtv-lite/output -d -p 8000:8000 guovern/gtv:lite"
tkinter_build = "pyinstaller tkinter_ui/tkinter_ui.spec"
docker_build = "docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --build-arg APP_WORKDIR=/gtv -t guovern/gtv ."
docker_build_lite = "docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --build-arg APP_WORKDIR=/gtv-lite --build-arg LITE=true -t guovern/gtv:lite ."
[dev-packages]
[packages]
requests = "*"
selenium = "*"
bs4 = "*"
@ -28,5 +27,18 @@ gunicorn = "*"
pillow = "*"
yt-dlp = "*"
[packages]
requests = "*"
bs4 = "*"
tqdm = "*"
async-timeout = "*"
aiohttp = "*"
flask = "*"
opencc-python-reimplemented = "*"
fake-useragent = "*"
gunicorn = "*"
pillow = "*"
yt-dlp = "*"
[requires]
python_version = "3.13"

1267
Pipfile.lock generated

File diff suppressed because it is too large Load diff

View file

@ -62,23 +62,23 @@
</details>
<br>
<p align="center">
<a href="https://github.com/Guovin/TV/releases/latest">
<img src="https://img.shields.io/github/v/release/guovin/tv" />
<a href="https://github.com/Guovin/GTV/releases/latest">
<img src="https://img.shields.io/github/v/release/guovin/gtv" />
</a>
<a href="https://www.python.org/">
<img src="https://img.shields.io/badge/python-%20%3E%3D%203.8-47c219" />
<img src="https://img.shields.io/badge/python-%20%3D%203.13-47c219" />
</a>
<a href="https://github.com/Guovin/TV/releases/latest">
<img src="https://img.shields.io/github/downloads/guovin/tv/total" />
<a href="https://github.com/Guovin/GTV/releases/latest">
<img src="https://img.shields.io/github/downloads/guovin/gtv/total" />
</a>
<a href="https://hub.docker.com/repository/docker/guovern/tv-requests">
<img src="https://img.shields.io/docker/pulls/guovern/tv-requests?label=docker:requests" />
<a href="https://hub.docker.com/repository/docker/guovern/gtv">
<img src="https://img.shields.io/docker/pulls/guovern/gtv?label=docker:gtv" />
</a>
<a href="https://hub.docker.com/repository/docker/guovern/tv-driver">
<img src="https://img.shields.io/docker/pulls/guovern/tv-driver?label=docker:driver" />
<a href="https://hub.docker.com/repository/docker/guovern/gtv-lite">
<img src="https://img.shields.io/docker/pulls/guovern/gtv-lite?label=docker:gtv-lite" />
</a>
<a href="https://github.com/Guovin/TV/fork">
<img src="https://img.shields.io/github/forks/guovin/tv" />
<a href="https://github.com/Guovin/GTV/fork">
<img src="https://img.shields.io/github/forks/guovin/gtv" />
</a>
</p>
@ -91,7 +91,7 @@
- ✅ 接口测速验效,响应时间、分辨率优先级,过滤无效接口
- ✅ 偏好设置IPv6、接口来源排序优先级与数量配置、接口白名单
- ✅ 定时执行,北京时间每日 6:00 与 18:00 执行更新
- ✅ 支持多种运行方式工作流、命令行、GUI 软件、Docker(amd64/arm64/arm v7/arm v8)
- ✅ 支持多种运行方式工作流、命令行、GUI 软件、Docker(amd64/arm64/arm v7)
- ✨ 更多功能请见[配置参数](./docs/config.md)
## 🔗 最新结果
@ -99,17 +99,17 @@
- 接口源:
```bash
https://ghproxy.net/raw.githubusercontent.com/Guovin/TV/gd/output/result.m3u
https://ghproxy.net/raw.githubusercontent.com/Guovin/GTV/gd/output/result.m3u
```
```bash
https://ghproxy.net/raw.githubusercontent.com/Guovin/TV/gd/output/result.txt
https://ghproxy.net/raw.githubusercontent.com/Guovin/GTV/gd/output/result.txt
```
- 数据源:
```bash
https://ghproxy.net/raw.githubusercontent.com/Guovin/TV/gd/source.json
https://ghproxy.net/raw.githubusercontent.com/Guovin/GTV/gd/source.json
```
## ⚙️ 配置
@ -129,7 +129,7 @@ pip install pipenv
```
```python
pipenv install
pipenv install --dev
```
```python
@ -138,7 +138,7 @@ pipenv run dev
### 方式三GUI 软件
1. 下载[更新工具软件](https://github.com/Guovin/TV/releases),打开软件,点击更新,即可完成更新
1. 下载[GTV 软件](https://github.com/Guovin/GTV/releases),打开软件,点击更新,即可完成更新
2. 或者在项目目录下运行以下命令,即可打开 GUI 软件:
@ -146,41 +146,39 @@ pipenv run dev
pipenv run ui
```
<img src="./docs/images/ui.png" alt="更新工具软件" title="更新工具软件" style="height:600px" />
<img src="./docs/images/ui.png" alt="GTV软件" title="GTV软件" style="height:600px" />
### 方式四Docker
- driver性能要求较高更新速度较慢稳定性、成功率高修改配置 open_driver = False 可切换到 request 版本(推荐酒店源、组播源、关键字搜索使用此版本)
- requests轻量级性能要求低更新速度快稳定性不确定推荐订阅源使用此版本
建议都试用一次,选择自己合适的版本
- gtv完整版本性能要求较高更新速度较慢稳定性、成功率高修改配置 open_driver = False 可切换到 Lite 版本运行方式(推荐酒店源、组播源、关键字搜索使用此版本)
- gtv:lite精简版本轻量级性能要求低更新速度快稳定性不确定推荐订阅源使用此版本
1. 拉取镜像:
- driver
- gtv
```bash
docker pull guovern/tv-driver:latest
docker pull guovern/gtv:latest
```
- requests
- gtv:lite
```bash
docker pull guovern/tv-requests:latest
docker pull guovern/gtv:lite
```
2. 运行容器:
- driver
- gtv
```bash
docker run -d -p 8000:8000 guovern/tv-driver
docker run -d -p 8000:8000 guovern/gtv
```
- requests
- gtv:lite
```bash
docker run -d -p 8000:8000 guovern/tv-requests
docker run -d -p 8000:8000 guovern/gtv:lite
```
卷挂载参数(可选):
@ -188,16 +186,16 @@ docker run -d -p 8000:8000 guovern/tv-requests
以宿主机路径/etc/docker 为例:
- driver
- gtv
```bash
docker run -v /etc/docker/config:/tv-driver/config -v /etc/docker/output:/tv-driver/output -d -p 8000:8000 guovern/tv-driver
docker run -v /etc/docker/config:/gtv/config -v /etc/docker/output:/gtv/output -d -p 8000:8000 guovern/gtv
```
- requests
- gtv:lite
```bash
docker run -v /etc/docker/config:/tv-requests/config -v /etc/docker/output:/tv-requests/output -d -p 8000:8000 guovern/tv-requests
docker run -v /etc/docker/config:/gtv-lite/config -v /etc/docker/output:/gtv-lite/output -d -p 8000:8000 guovern/gtv:lite
```
3. 更新结果:
@ -220,7 +218,7 @@ docker run -v /etc/docker/config:/tv-requests/config -v /etc/docker/output:/tv-r
## 👀 关注
微信公众号搜索 Govin或扫码
微信公众号搜索 Govin或扫码,接收更新推送、学习更多使用技巧
![微信公众号](./static/images/qrcode.jpg)

View file

@ -62,23 +62,23 @@
</details>
<br>
<p align="center">
<a href="https://github.com/Guovin/TV/releases/latest">
<img src="https://img.shields.io/github/v/release/guovin/tv" />
<a href="https://github.com/Guovin/GTV/releases/latest">
<img src="https://img.shields.io/github/v/release/guovin/gtv" />
</a>
<a href="https://www.python.org/">
<img src="https://img.shields.io/badge/python-%20%3E%3D%203.8-47c219" />
<img src="https://img.shields.io/badge/python-%20%3D%203.13-47c219" />
</a>
<a href="https://github.com/Guovin/TV/releases/latest">
<img src="https://img.shields.io/github/downloads/guovin/tv/total" />
<a href="https://github.com/Guovin/GTV/releases/latest">
<img src="https://img.shields.io/github/downloads/guovin/gtv/total" />
</a>
<a href="https://hub.docker.com/repository/docker/guovern/tv-requests">
<img src="https://img.shields.io/docker/pulls/guovern/tv-requests?label=docker:requests" />
<a href="https://hub.docker.com/repository/docker/guovern/gtv">
<img src="https://img.shields.io/docker/pulls/guovern/gtv?label=docker:gtv" />
</a>
<a href="https://hub.docker.com/repository/docker/guovern/tv-driver">
<img src="https://img.shields.io/docker/pulls/guovern/tv-driver?label=docker:driver" />
<a href="https://hub.docker.com/repository/docker/guovern/gtv-lite">
<img src="https://img.shields.io/docker/pulls/guovern/gtv-lite?label=docker:gtv-lite" />
</a>
<a href="https://github.com/Guovin/TV/fork">
<img src="https://img.shields.io/github/forks/guovin/tv" />
<a href="https://github.com/Guovin/GTV/fork">
<img src="https://img.shields.io/github/forks/guovin/gtv" />
</a>
</p>
@ -91,7 +91,7 @@
- ✅ Interface speed testing and verification, with priority on response time and resolution, filtering out ineffective interfaces
- ✅ Preferences: IPv6, priority and quantity of interface source sorting, and interface whitelist
- ✅ Scheduled execution at 6:00 AM and 18:00 PM Beijing time daily
- ✅ Supports various execution methods: workflows, command line, GUI software, Docker(amd64/arm64/arm v7/arm v8)
- ✅ Supports various execution methods: workflows, command line, GUI software, Docker(amd64/arm64/arm v7)
- ✨ For more features, see [Config parameter](./docs/config_en.md)
## 🔗 Latest results
@ -129,7 +129,7 @@ pip install pipenv
```
```python
pipenv install
pipenv install --dev
```
```python
@ -138,7 +138,7 @@ pipenv run dev
### Method 3: GUI Software
1. Download [Update tool software](https://github.com/Guovin/TV/releases), open the software, click update to complete the update
1. Download [GTV software](https://github.com/Guovin/GTV/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:
@ -146,41 +146,41 @@ pipenv run dev
pipenv run ui
```
<img src="./docs/images/ui.png" alt="Update tool software" title="Update tool software" style="height:600px" />
<img src="./docs/images/ui.png" alt="GTV software" title="GTV software" style="height:600px" />
### Method 4: Docker
- driver: Higher performance requirements, slower update speed, high stability and success rate. Set open_driver = False to switch to the request version (recommended for hotel sources, multicast sources, and online searches)
- requests: Lightweight, low performance requirements, fast update speed, stability uncertain (recommend using this version for the subscription source)
- gtv (Full version): Higher performance requirements, slower update speed, high stability and success rate. Set open_driver = False to switch to the gtv-lite version (recommended for hotel sources, multicast sources, and online searches)
- gtv:lite (Condensed version): Lightweight, low performance requirements, fast update speed, stability uncertain (recommend using this version for the subscription source)
It's recommended to try each one and choose the version that suits you
1. Pull the image:
- driver
- gtv
```bash
docker pull guovern/tv-driver:latest
docker pull guovern/gtv:latest
```
- requests
- gtv:lite
```bash
docker pull guovern/tv-requests:latest
docker pull guovern/gtv:lite
```
2. Run the container:
- driver
- gtv
```bash
docker run -d -p 8000:8000 guovern/tv-driver
docker run -d -p 8000:8000 guovern/gtv
```
- requests
- gtv:lite
```bash
docker run -d -p 8000:8000 guovern/tv-requests
docker run -d -p 8000:8000 guovern/gtv:lite
```
Volume Mount Parameter (Optional):
@ -188,16 +188,16 @@ This allows synchronization of files between the host machine and the container.
Taking the host path /etc/docker as an example:
- driver
- gtv
```bash
docker run -v /etc/docker/config:/tv-driver/config -v /etc/docker/output:/tv-driver/output -d -p 8000:8000 guovern/tv-driver
docker run -v /etc/docker/config:/gtv/config -v /etc/docker/output:/gtv/output -d -p 8000:8000 guovern/gtv
```
- requests
- gtv:lite
```bash
docker run -v /etc/docker/config:/tv-requests/config -v /etc/docker/output:/tv-requests/output -d -p 8000:8000 guovern/tv-requests
docker run -v /etc/docker/config:/gtv-lite/config -v /etc/docker/output:/gtv-lite/output -d -p 8000:8000 guovern/gtv:lite
```
3. Update results:
@ -220,7 +220,7 @@ docker run -v /etc/docker/config:/tv-requests/config -v /etc/docker/output:/tv-r
## 👀 Follow
Wechat public account search Govin, or scan code:
Wechat public account search for Govin, or scan the code to receive updates and learn more tips:
![Wechat public account](./static/images/qrcode.jpg)

View file

@ -23,7 +23,7 @@
### 1. Star
打开 https://github.com/Guovin/TV ,点击 Star 收藏该项目(您的 Star 是我持续更新的动力)
打开 https://github.com/Guovin/GTV ,点击 Star 收藏该项目(您的 Star 是我持续更新的动力)
![Star](./images/star.png 'Star')
### 2. Watch
@ -168,20 +168,27 @@ https://mirror.ghproxy.com/raw.githubusercontent.com/您的github用户名/仓
### 方式二:命令行
```python
1. 安装 Python
请至官方下载并安装 Python安装时请选择将 Python 添加到系统环境变量 Path 中
请至官方下载并安装 Python安装时请选择将 Python 添加到系统环境变量 Path 中
2. 运行更新
项目目录下打开终端 CMD 依次运行以下命令:
项目目录下打开终端 CMD 依次运行以下命令:
```python
pip install pipenv
pipenv install
```
```python
pipenv install --dev
```
```python
pipenv run dev
```
### 方式三GUI 软件
1. 下载[更新工具软件](https://github.com/Guovin/TV/releases),打开软件,点击更新,即可完成更新
1. 下载[GTV 软件](https://github.com/Guovin/GTV/releases),打开软件,点击更新,即可完成更新
2. 或者在项目目录下运行以下命令,即可打开 GUI 软件:
@ -189,37 +196,63 @@ pipenv run dev
pipenv run ui
```
![更新工具软件](./images/ui.png '更新工具软件')
![GTV](./images/ui.png 'GTV')
### 方式四Docker
- requests轻量级性能要求低更新速度快稳定性不确定推荐订阅源使用此版本
- driver性能要求较高更新速度较慢稳定性、成功率高修改配置 open_driver = False 可切换到 request 版本(推荐酒店源、组播源、关键字搜索使用此版本)
- gtv完整版本性能要求较高更新速度较慢稳定性、成功率高修改配置 open_driver = False 可切换到 Lite 版本运行方式(推荐酒店源、组播源、关键字搜索使用此版本)
- gtv:lite精简版本轻量级性能要求低更新速度快稳定性不确定推荐订阅源使用此版本
1. 拉取镜像:
- gtv
```bash
1. 拉取镜像:
requests
docker pull guovern/tv-requests:latest
docker pull guovern/gtv:latest
```
driver
docker pull guovern/tv-driver:latest
- gtv:lite
```bash
docker pull guovern/gtv:lite
```
2. 运行容器:
docker run -d -p 8000:8000 guovern/tv-requests 或 tv-driver
- gtv
```bash
docker run -d -p 8000:8000 guovern/gtv
```
- gtv:lite
```bash
docker run -d -p 8000:8000 guovern/gtv:lite
```
卷挂载参数(可选):
实现宿主机文件与容器文件同步,修改模板、配置、获取更新结果文件可直接在宿主机文件夹下操作
配置文件:
-v 宿主机路径/config:/tv-requests/config 或 tv-driver/config
以宿主机路径/etc/docker 为例:
结果文件:
-v 宿主机路径/output:/tv-requests/output 或 tv-driver/output
- gtv
3. 查看更新结果:访问(域名:8000
```bash
docker run -v /etc/docker/config:/gtv/config -v /etc/docker/output:/gtv/output -d -p 8000:8000 guovern/gtv
```
#### 注方式一至三更新完成后的结果文件链接http://本地 ip:8000 或 http://localhost:8000
- gtv:lite
```bash
docker run -v /etc/docker/config:/gtv-lite/config -v /etc/docker/output:/gtv-lite/output -d -p 8000:8000 guovern/gtv:lite
```
3. 更新结果:
- 接口地址ip:8000
- 接口详情ip:8000/result
- 测速日志ip:8000/log
### 上传更新文件至仓库(可选)

View file

@ -23,7 +23,7 @@ Since this project will continue to iterate and improve, if you want to get the
### 1. Star
Go to https://github.com/Guovin/TV, click on Star to bookmark this project (Your Star is my motivation to keep updating).
Go to https://github.com/Guovin/GTV, click on Star to bookmark this project (Your Star is my motivation to keep updating).
![Star](./images/star.png 'Star')
### 2. Watch
@ -165,20 +165,27 @@ If you want to perform updates every 2 days, you can modify it like this:
### Method 2: Command Line
```python
1. Install Python
Please download and install Python from the official site. During installation, choose to add Python to the system's environment variables Path.
Please download and install Python from the official site. During installation, choose to add Python to the system's environment variables Path.
2. Run Update
Open a CMD terminal in the project directory and run the following commands in sequence:
Open a CMD terminal in the project directory and run the following commands in sequence:
```python
pip install pipenv
pipenv install
```
```python
pipenv install --dev
```
```python
pipenv run dev
```
### Method 3: GUI Software
1. Download the update tool software, open the software, click update to complete the update.
1. Download [GTV software](https://github.com/Guovin/GTV/releases), open the software, click update to complete the update.
2. Alternatively, run the following command in the project directory to open the GUI software:
@ -190,33 +197,61 @@ pipenv run ui
### Method 4: Docker
- requests: Lightweight, low performance requirements, fast update speed, stability uncertain (recommend this version for subscription sources)
- driver: Higher performance requirements, slower update speed, high stability and success rate. Set open_driver = False to switch to the request version (recommended for hotel sources, multicast sources, and keyword search)
- gtv (Full version): Higher performance requirements, slower update speed, high stability and success rate. Set open_driver = False to switch to the gtv-lite version (recommended for hotel sources, multicast sources, and online searches)
- gtv:lite (Condensed version): Lightweight, low performance requirements, fast update speed, stability uncertain (recommend using this version for the subscription source)
It's recommended to try each one and choose the version that suits you
1. Pull the image:
- gtv
```bash
1. Pull the image:
For requests version:
docker pull guovern/tv-requests:latest
docker pull guovern/gtv:latest
```
For driver version:
docker pull guovern/tv-driver:latest
- gtv:lite
```bash
docker pull guovern/gtv:lite
```
2. Run the container:
docker run -d -p 8000:8000 guovern/tv-requests or driver
- gtv
```bash
docker run -d -p 8000:8000 guovern/gtv
```
- gtv:lite
```bash
docker run -d -p 8000:8000 guovern/gtv:lite
```
Volume Mount Parameter (Optional):
This allows synchronization of files between the host machine and the container. Modifying templates, configurations, and retrieving updated result files can be directly operated in the host machine's folder.
config:
-v <path>/config:/tv-requests/config or tv-driver/config
Taking the host path /etc/docker as an example:
result:
-v <path>/output:/tv-requests/output or tv-driver/output
- gtv
3. Check the update results: Visit (domain:8000)
```bash
docker run -v /etc/docker/config:/gtv/config -v /etc/docker/output:/gtv/output -d -p 8000:8000 guovern/gtv
```
#### Note: Link to the result file after updates of methods one to three: http://local ip:8000 or http://localhost:8000
- gtv:lite
```bash
docker run -v /etc/docker/config:/gtv-lite/config -v /etc/docker/output:/gtv-lite/output -d -p 8000:8000 guovern/gtv:lite
```
3. Update results:
- API address: ip:8000
- API details: ip:8000/result
- Speed test log: ip:8000/log
### Update the File to the Repository(optional)

View file

@ -1,13 +1,5 @@
#!/bin/bash
for file in /tv_config/*; do
filename=$(basename "$file")
target_file="$APP_WORKDIR/config/$filename"
if [ ! -e "$target_file" ]; then
cp -r "$file" "$target_file"
fi
done
service cron start
pipenv run python $APP_WORKDIR/main.py

View file

@ -44,14 +44,14 @@ class AboutUI:
project_label.pack()
project_link = tk.Label(
project_row_column2,
text="https://github.com/Guovin/TV",
text="https://github.com/Guovin/GTV",
fg="blue",
cursor="hand2",
)
project_link.pack()
project_link.bind(
"<Button-1>",
lambda e: webbrowser.open_new_tab("https://github.com/Guovin/TV"),
lambda e: webbrowser.open_new_tab("https://github.com/Guovin/GTV"),
)
disclaimer_label = tk.Label(

View file

@ -19,6 +19,7 @@ def get_speed_yt_dlp(url, timeout=config.sort_timeout):
"skip_download": True,
"quiet": True,
"no_warnings": True,
"logger": logging.getLogger(),
}
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
start_time = time()