diff --git a/CHANGELOG.md b/CHANGELOG.md index 233ad31..9369987 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,38 @@ # 更新日志(Changelog) +## v1.5.5 + +### 2024/12/2 + +- ✨ 增加部分订阅源,移除失效源 +- 🐛 调整github代理地址,解决访问失效(#603) +- 🐛 修复GUI测速阶段重复弹出窗口问题(#600) +- 🐛 修正宁夏/青海模板频道(#594) +- 🐛 修复IPv6结果为空问题 +- 🪄 优化Docker测速CPU占用问题(#606) +- 🛠 调整部分默认配置 + +
+ English + +- ✨ Added some subscription sources, removed invalid sources +- 🐛 Adjusted GitHub proxy address to fix access failure (#603) +- 🐛 Fixed repeated pop-up window issue during GUI speed test phase (#600) +- 🐛 Corrected Ningxia/Qinghai template channels (#594) +- 🐛 Fixed issue with empty IPv6 results +- 🪄 Optimized Docker speed test CPU usage (#606) +- 🛠 Adjusted some default configurations + +
+ ## v1.5.4 ### 2024/11/29 - ⚠️ Python 升级至 3.13,该版本已不支持 Win7,若有需要请使用 v1.5.3 - ⚠️ Github 仓库改名:iptv-api,使用旧接口地址请及时更换新地址 -- ⚠️ Docker 新镜像仓库启用:guovern/iptv-api(旧版的 tv-driver 改为:guovern/iptv-api:latest,tv-requests 改为 guovern/iptv-api:lite),iptv-api:latest 为完整版、iptv-api:lite 为精简版,请使用新的名称命令进行拉取,旧仓库将不再维护 +- ⚠️ Docker 新镜像仓库启用:guovern/iptv-api(旧版的 tv-driver 改为:guovern/iptv-api:latest,tv-requests 改为 + guovern/iptv-api:lite),iptv-api:latest 为完整版、iptv-api:lite 为精简版,请使用新的名称命令进行拉取,旧仓库将不再维护 - ❤️ 新增微信公众号关注途径(公众号搜索:Govin),推荐关注公众号,可订阅更新通知与使用技巧等文章推送,还可进行交流讨论 - ✨ 更换测速方法(yt-dlp),重构测速逻辑,提升准确性、稳定性与效率,减小接口切换延迟(#563) - ✨ 新增支持 ARM v7(#562) @@ -19,10 +45,15 @@ English - ⚠️ Python has been upgraded to version 3.13, which no longer supports Win7. If needed, please use version v1.5.3. -- ⚠️ The GitHub repository has been renamed to iptv-api. If you are using the old API address, please update it to the new one promptly. -- ⚠️ New Docker image repository is now active: guovern/iptv-api (the old tv-driver is now guovern/iptv-api:latest, and tv-requests is now guovern/iptv-api:lite). iptv-api:latest is the full version, and iptv-api:lite is the lightweight version. Please use the new names to pull the images, as the old repository will no longer be maintained. -- ❤️ A new way to follow the WeChat official account (search for: Govin) has been added. It is recommended to follow the official account to subscribe to update notifications, usage tips, and engage in discussions. -- ✨ The speed measurement method has been changed to yt-dlp, and the speed measurement logic has been refactored to improve accuracy, stability, and efficiency, reducing interface switching delay (#563). +- ⚠️ The GitHub repository has been renamed to iptv-api. If you are using the old API address, please update it to the + new one promptly. +- ⚠️ New Docker image repository is now active: guovern/iptv-api (the old tv-driver is now guovern/iptv-api:latest, and + tv-requests is now guovern/iptv-api:lite). iptv-api:latest is the full version, and iptv-api:lite is the lightweight + version. Please use the new names to pull the images, as the old repository will no longer be maintained. +- ❤️ A new way to follow the WeChat official account (search for: Govin) has been added. It is recommended to follow the + official account to subscribe to update notifications, usage tips, and engage in discussions. +- ✨ The speed measurement method has been changed to yt-dlp, and the speed measurement logic has been refactored to + improve accuracy, stability, and efficiency, reducing interface switching delay (#563). - ✨ Support for ARM v7 has been added (#562). - ✨ Dual result API access (ip/m3u, ip/txt) has been added (#581). - ✨ A command to start the API service (pipenv run service) has been added. @@ -79,7 +110,8 @@ - 🐛 Fixed the issue of the program stopping (#527). - 🐛 Fixed the issue of Win7 GUI startup (#536). - 🗑️ Removed some invalid subscription sources. -- 🗑️ Removed the domain blacklist configuration (domain_blacklist). Please use the interface keyword blacklist (url_keywords_blacklist) instead. +- 🗑️ Removed the domain blacklist configuration (domain_blacklist). Please use the interface keyword blacklist ( + url_keywords_blacklist) instead. @@ -89,8 +121,9 @@ - ✨ 新增频道接口白名单:不参与测速,永远保留在结果最前面(#470) 使用方法: - 1. 模板频道接口地址后添加$!即可实现(如:广东珠江,http://xxx.m3u$! ) - 2. 额外信息补充(如:广东珠江,http://xxx.m3u$!额外信息 ),更多接口白名单请至https://github.com/Guovin/iptv-api/issues/514 讨论 + 1. 模板频道接口地址后添加$!即可实现(如:广东珠江,http://xxx.m3u$! ) + 2. 额外信息补充(如:广东珠江,http://xxx.m3u$!额外信息 ),更多接口白名单请至https: + //github.com/Guovin/iptv-api/issues/514 讨论 - ✨ 新增 🈳 无结果频道分类:无结果频道默认归类至该底部分类下(#473) - ✨ 接口地址增加来源类型说明 - ✨ 默认模板增加广东民生(#481)、广州综合(#504) @@ -106,11 +139,14 @@
English -- ✨ Added channel interface whitelist: Not participating in speed testing, always kept at the very front of the results. (#470) +- ✨ 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/iptv-api/issues/514. -- ✨ Added 🈳 No Results Channel Category: Channels without results are categorized under this bottom category by default (#473). + 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/iptv-api/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). - 🪄 Optimized preferred result output. @@ -121,6 +157,7 @@ - 🐛 Fixed the unpack error in result logs. - 🐛 Fixed the issue of empty interface information in results (#505). - 🗑️ Removed txt result files from the repository root directory. Please check the result files in the output directory. +
## v1.5.0 @@ -129,8 +166,8 @@ - ✨🛠 新增结果偏好设置: - 1. 接口来源优先级(origin_type_prefer)与数量设置(hotel_num, multicast_num, subscribe_num, online_search_num) - 2. IPv 类型优先级(ipv_type_prefer)与数量设置(ipv4_num, ipv6_num) + 1. 接口来源优先级(origin_type_prefer)与数量设置(hotel_num, multicast_num, subscribe_num, online_search_num) + 2. IPv 类型优先级(ipv_type_prefer)与数量设置(ipv4_num, ipv6_num) - ✨🛠 新增控制接口测速超时时间(sort_timeout)(#388) - ✨🛠 新增控制是否开启页面服务(open_service)(青龙等平台可使用该配置实现任务执行完成后停止运行) @@ -147,18 +184,22 @@ English - ✨🛠 Added result preference settings: - 1. Source priority (origin_type_prefer) and quantity settings (hotel_num, multicast_num, subscribe_num, online_search_num) - 2. IPv type priority (ipv_type_prefer) and quantity settings (ipv4_num, ipv6_num) + 1. Source priority (origin_type_prefer) and quantity settings (hotel_num, multicast_num, subscribe_num, + online_search_num) + 2. IPv type priority (ipv_type_prefer) and quantity settings (ipv4_num, ipv6_num) - ✨🛠 Added control for API speed test timeout (sort_timeout) (#388) -- ✨🛠 Added control to enable or disable page service (open_service) (this configuration can be used on platforms like QingLong to stop running after task completion) +- ✨🛠 Added control to enable or disable page service (open_service) (this configuration can be used on platforms like + QingLong to stop running after task completion) - ✨🛠 Added control to show or hide API related information (open_url_info) (#431) - ✨ Added support for m3u address subscription sources (#389) - ✨ Added 🏛 Classic Theater -- 🪄 Optimized Docker ARM64 FFmpeg support (it is recommended to use the requests image for some ARM devices that cannot run the driver image) +- 🪄 Optimized Docker ARM64 FFmpeg support (it is recommended to use the requests image for some ARM devices that cannot + run the driver image) - 🪄 Optimized obtaining non-numeric domain IP addresses for multicast (#410) - 🪄 Optimize the issue of non-existent new parameters when using old configuration files, use default values - 🐛 Fixed issues with converting non-standard txt files to m3u format (#422) - 🐛 Fixed issues with failing to obtain IPv6 interface information (#452) + ## v1.4.9 @@ -175,7 +216,8 @@ - 移除央视台球部分错误组播地址 - 更新使用教程 -- Warning: This update involves configuration changes. Please refer to the latest config.ini. Users of workflow using user_config.ini or Docker mounted configurations should update their configuration files promptly +- Warning: This update involves configuration changes. Please refer to the latest config.ini. Users of workflow using + user_config.ini or Docker mounted configurations should update their configuration files promptly - Add support for Docker ARM64 images (#369) - Add resolution filtering feature (related configurations: open_filter_resolution, min_resolution) - Add display of update time (related configuration: open_update_time) @@ -195,7 +237,8 @@ - 增加汕头频道组播 - 调整默认接口数量为 30 -- Add some channels to the default template: Migu Live, CCTV Pay Channels, Movie Channel, Hong Kong and Macau Channels, Local Channels, etc +- 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 @@ -257,7 +300,8 @@ - 修正 RTP 文件:贵州电信文件错误,第一财经、东方财经等频道命名,地址错误 -- Fixed RTP files: Corrected errors in Guizhou Telecom files, including naming and address errors for channels such as First Financial and Oriental Financial +- Fixed RTP files: Corrected errors in Guizhou Telecom files, including naming and address errors for channels such as + First Financial and Oriental Financial ## v1.4.2 @@ -305,9 +349,11 @@ - 修复组播地区选择全部时无法运行问题 - 修复工作流使用 user_config 时无法生成 m3u 结果问题 -- Warning: This update involves configuration changes. Please refer to the latest config/config.ini. Users using user_config.ini or Docker-mounted configurations should update their configuration files promptly. +- Warning: This update involves configuration changes. Please refer to the latest config/config.ini. Users using + user_config.ini or Docker-mounted configurations should update their configuration files promptly. - Added multicast source operation modes: FOFA, Tonkiang. -- Added support for custom-maintained multicast source channel IPs, located in config/rtp, with files named by "region_operator". +- Added support for custom-maintained multicast source channel IPs, located in config/rtp, with files named by " + region_operator". - Optimized speed test method, significantly improving the speed test of multicast sources and hotel sources. - Optimized channel name matching method to support fuzzy matching, increasing hit rate. - Optimized region input selection box. @@ -319,9 +365,12 @@ ### 2024/8/30 -- 酒店源新增 ZoomEye 数据源,开启 FOFA 配置即可使用(Added ZoomEye data source to hotel sources, can be used by enabling FOFA configuration) -- 酒店源、组播源地区选项增加“全部”选项(Added "all" option to the region selection for hotel sources and multicast sources) -- 调整默认运行配置:关闭订阅源更新、Tonkiang 酒店源更新(Adjusted default runtime configuration: disabled subscription source updates and Tonkiang hotel source updates) +- 酒店源新增 ZoomEye 数据源,开启 FOFA 配置即可使用(Added ZoomEye data source to hotel sources, can be used by enabling + FOFA configuration) +- 酒店源、组播源地区选项增加“全部”选项(Added "all" option to the region selection for hotel sources and multicast + sources) +- 调整默认运行配置:关闭订阅源更新、Tonkiang 酒店源更新(Adjusted default runtime configuration: disabled subscription + source updates and Tonkiang hotel source updates) ## v1.3.8 @@ -337,7 +386,8 @@ ### 2024/8/27 -- 新增支持 M3U 结果格式转换,支持显示频道图标(open_m3u_result)(Added support for M3U result format conversion, including channel icon display (open_m3u_result)) +- 新增支持 M3U 结果格式转换,支持显示频道图标(open_m3u_result)(Added support for M3U result format conversion, including + channel icon display (open_m3u_result)) - 新增对于无结果的频道进行额外补充查询(Added additional queries for channels with no results) - 增加控制使用 FFmpeg 开关(open_ffmpeg)(Added a switch to control the use of FFmpeg (open_ffmpeg)) - 调整默认配置以酒店源模式运行(Adjusted default configuration to run in hotel source mode) @@ -351,29 +401,38 @@ ### 2024/8/22 - 新增酒店源更新,支持 Tonkiang、FOFA 两种工作模式(Added hotel source updates, supporting Tonkiang and FOFA working modes) -- 重构 UI 界面软件,新增帮助-关于、获取频道名称编辑、酒店源相关配置、软件图标(Refactored UI interface software, added Help-About, channel name editing, hotel source related configuration, and software icon) -- 新增测速日志页面服务,结果链接后添加/log 即可查看(Added a new speed test log page service. To view the results, simply add /log to the link) +- 重构 UI 界面软件,新增帮助-关于、获取频道名称编辑、酒店源相关配置、软件图标(Refactored UI interface software, added + Help-About, channel name editing, hotel source related configuration, and software icon) +- 新增测速日志页面服务,结果链接后添加/log 即可查看(Added a new speed test log page service. To view the results, simply + add /log to the link) - 移除关注频道相关配置(Removed configuration related to followed channels) - 修复 Docker 定时任务未执行问题(Fixed issue with Docker scheduled tasks not executing) - 修复使用历史结果时频道数据异常问题(Fixed issue with channel data anomalies when using historical results) -- 优化 UI 界面软件运行生成配置目录,方便查看与修改(Optimized UI interface software to generate configuration directory for easier viewing and modification) +- 优化 UI 界面软件运行生成配置目录,方便查看与修改(Optimized UI interface software to generate configuration directory + for easier viewing and modification) ## v1.3.5 ### 2024/8/14 -- 新增支持地区组播 ip 更新,调整默认以此模式运行,基本实现高清流畅播放(#225)(Added support for updating multicast IP for new regions and adjusted the default to run in this mode, basically achieving high-definition smooth playback (#225)) -- 新增支持使用 FFmpeg 进行测速排序、获取分辨率信息,本地运行请手动安装 FFmpeg(Added support for speed sorting and resolution information using FFmpeg. Manually install FFmpeg when running locally) -- 接口源增加分辨率信息,用于源切换时显示(Added resolution information to the interface source for display during source switching) -- 调整配置文件与结果文件路径(config、output 目录),方便 docker 卷挂载(#226)(Adjusted the paths for configuration and result files (config, output directories) to facilitate Docker volume mounting (#226)) +- 新增支持地区组播 ip 更新,调整默认以此模式运行,基本实现高清流畅播放(#225)(Added support for updating multicast IP for + new regions and adjusted the default to run in this mode, basically achieving high-definition smooth playback (#225)) +- 新增支持使用 FFmpeg 进行测速排序、获取分辨率信息,本地运行请手动安装 FFmpeg(Added support for speed sorting and + resolution information using FFmpeg. Manually install FFmpeg when running locally) +- 接口源增加分辨率信息,用于源切换时显示(Added resolution information to the interface source for display during source + switching) +- 调整配置文件与结果文件路径(config、output 目录),方便 docker 卷挂载(#226)(Adjusted the paths for configuration and + result files (config, output directories) to facilitate Docker volume mounting (#226)) - 修改配置文件类型(config.ini)(Modified the configuration file type (config.ini)) ## v1.3.4 ### 2024/7/31 -- 新增配置 open_use_old_result:保留使用历史更新结果,合并至本次更新中(Add configuration open_use_old_result: Keep using the previous update results and merge them into the current update) -- 新增配置 open_keep_all:保留所有检索结果,推荐手动维护时开启(#121)(Add configuration open_keep_all: Keep all search results, recommend enabling it for manual maintenance (#121)) +- 新增配置 open_use_old_result:保留使用历史更新结果,合并至本次更新中(Add configuration open_use_old_result: Keep using + the previous update results and merge them into the current update) +- 新增配置 open_keep_all:保留所有检索结果,推荐手动维护时开启(#121)(Add configuration open_keep_all: Keep all search + results, recommend enabling it for manual maintenance (#121)) ## v1.3.3 @@ -397,8 +456,10 @@ ### 2024/7/9 - 重构代码,模块拆分,优化 CPU/内存占用(Refactor code, modular decomposition, optimize CPU/memory usage) -- 新增两种工作模式:driver 模式、requests 模式,具体差异见文档说明(Add two new working modes: driver mode and requests mode, see documentation for specific differences) -- 调整软件界面,功能分类摆放,增加配置:开启更新、开启浏览器模式、开启代理(Adjust the software interface, arrange features by category, add configurations: enable updates, enable browser mode, enable proxy) +- 新增两种工作模式:driver 模式、requests 模式,具体差异见文档说明(Add two new working modes: driver mode and requests + mode, see documentation for specific differences) +- 调整软件界面,功能分类摆放,增加配置:开启更新、开启浏览器模式、开启代理(Adjust the software interface, arrange features by + category, add configurations: enable updates, enable browser mode, enable proxy) - 调整工作流更新时间为北京时间每日 6:00(Adjust workflow update time to 6:00 AM Beijing time daily) - Docker 镜像增加两种工作模式版本(Docker image adds two new working mode versions) @@ -408,7 +469,8 @@ - 新增更新结果页面服务(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) +- 修复在线查询更新,增加随机代理、失败重试,提高获取结果成功率(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) @@ -419,7 +481,8 @@ - 优化排序执行逻辑(Optimize the sorting execution logic) - 优化超时重试方法(Optimize the timeout retry method) -- 调整默认配置 open_sort:关闭工作流测速排序,建议本地运行更准确(Adjust the default configuration open_sort: turn off the workflow speed test sorting, local execution is recommended for more accurate results) +- 调整默认配置 open_sort:关闭工作流测速排序,建议本地运行更准确(Adjust the default configuration open_sort: turn off the + workflow speed test sorting, local execution is recommended for more accurate results) ## v1.2.3 @@ -442,29 +505,35 @@ - 兼容 Win7 系统,请使用 Python 版本>=3.8(Compatible with Windows 7 system, please use Python version >= 3.8) - 修复部分设备运行更新报错(Fixed an error that occurred when some devices ran updates) - 修复工作流更新错误(Fixed an error in the workflow update) -- 新增捐赠途径(主页底部),本项目完全免费,维护不易,若对您有帮助,可选择捐赠(Add new donation channels (bottom of the homepage), this project is completely free, maintenance is not easy, if it helps you, you can choose to donate) +- 新增捐赠途径(主页底部),本项目完全免费,维护不易,若对您有帮助,可选择捐赠(Add new donation channels (bottom of the + homepage), this project is completely free, maintenance is not easy, if it helps you, you can choose to donate) ## v1.2.0 ### 2024/6/9 -- 异步并发、多线程支持,大幅提升更新速度(近 10 倍)(Asynchronous concurrency and multi-threading support, significantly increasing update speeds (nearly 10 times faster)) -- 新增更新工具软件(release 附件:update-tool.exe),首个版本可能会有不可预见的问题,请见谅(Added new update tool software (release attachment: update-tool.exe); the first version may have unforeseen issues, please be understanding) +- 异步并发、多线程支持,大幅提升更新速度(近 10 倍)(Asynchronous concurrency and multi-threading support, significantly + increasing update speeds (nearly 10 times faster)) +- 新增更新工具软件(release 附件:update-tool.exe),首个版本可能会有不可预见的问题,请见谅(Added new update tool software ( + release attachment: update-tool.exe); the first version may have unforeseen issues, please be understanding) ## v1.1.6 ### 2024/5/17 - 增加组播源可全地区运行更新(Added multicast sources to run region-wide updates) -- 修改默认值:关闭在线检索功能,组播源全地区更新(Change the default value: Disable the online search function and update the multicast source in all regions) +- 修改默认值:关闭在线检索功能,组播源全地区更新(Change the default value: Disable the online search function and update + the multicast source in all regions) ## v1.1.5 ### 2024/5/17 -- 增加模糊匹配规则,适配在线检索、订阅源、组播源(Add fuzzy matching rules for online search, subscription sources, and multicast sources) +- 增加模糊匹配规则,适配在线检索、订阅源、组播源(Add fuzzy matching rules for online search, subscription sources, and + multicast sources) - 增加订阅源、组播源更新进度条(Added the update progress bar for subscription sources and multicast sources) -- 优化组播源更新可能出现的无匹配结果情况(Optimize the possible situation of no match results in multicast source updates) +- 优化组播源更新可能出现的无匹配结果情况(Optimize the possible situation of no match results in multicast source + updates) - 移除部分错误日志打印(Removes some error log prints) - 移除严格匹配配置(Removes strict matching configurations) @@ -473,7 +542,8 @@ ### 2024/5/15 - 新增组播源功能(Added multicast source feature) -- 新增控制开关,控制多种获取模式的启用状态(Added control switch to manage the activation status of various acquisition modes) +- 新增控制开关,控制多种获取模式的启用状态(Added control switch to manage the activation status of various acquisition + modes) - 新增严格匹配(Added strict matching) - 优化文件读取,提升模板初始化速度(Optimized file reading to improve initialization speed based on templates) @@ -489,7 +559,8 @@ ### 2024/5/7 -- 重构接口获取方法,增强通用性,适应结构变更(Refactored the method for obtaining the interface, enhanced its universality, and adapted to structural changes) +- 重构接口获取方法,增强通用性,适应结构变更(Refactored the method for obtaining the interface, enhanced its universality, + and adapted to structural changes) - 修复 gd 分支自动更新问题(#105)(Fixed the automatic update issue of the gd branch (#105)) - 优化自定义接口源获取,接口去重(Optimized the acquisition of custom interface sources and removed duplicate interfaces) @@ -497,25 +568,31 @@ ### 2024/4/29 -- 为避免代码合并冲突,移除 master 分支作为运行更新工作流,master 仅作为新功能发布分支,有使用我的链接的小伙伴请修改使用 gd 分支(void code merge conflicts, the master branch has been removed as the branch for running update workflows. The master branch is now only used for releasing new features. If you are using my link, please modify it to use the gd branch) +- 为避免代码合并冲突,移除 master 分支作为运行更新工作流,master 仅作为新功能发布分支,有使用我的链接的小伙伴请修改使用 gd + 分支(void code merge conflicts, the master branch has been removed as the branch for running update workflows. The + master branch is now only used for releasing new features. If you are using my link, please modify it to use the gd + branch) ## v1.1.0 ### 2024/4/26 -- 新增自定义接口获取源,配置项为 extend_base_urls(#56)(Added custom interface for source acquisition, the configuration item is extend_base_urls (#56)) +- 新增自定义接口获取源,配置项为 extend_base_urls(#56)(Added custom interface for source acquisition, the configuration + item is extend_base_urls (#56)) ## v1.0.9 ### 2024/4/25 -- 改进接口获取方法,增强处理多种失效场景(Improve the method of obtaining the interface, enhance the handling of various failure scenarios) +- 改进接口获取方法,增强处理多种失效场景(Improve the method of obtaining the interface, enhance the handling of various + failure scenarios) ## v1.0.8 ### 2024/4/24 -- 跟进某个节点检索频道名称参数变更(#91)(Follow up on the parameter change of channel name retrieval for a certain node (#91)) +- 跟进某个节点检索频道名称参数变更(#91)(Follow up on the parameter change of channel name retrieval for a certain node ( + #91)) - 调整默认运行配置(Adjust the default running configuration) ## v1.0.7 @@ -524,23 +601,33 @@ - 增加双节点接口来源,按最佳节点更新(Added dual-node interface source, update according to the best node) - 优化频道更新结果为空的情况(#81)(Optimized the situation where the channel update result is empty (#81)) -- 调整工作流资源使用限制逻辑,在允许的范围内提升更新速度(Adjusted the logic of workflow resource usage limit, increase the update speed within the allowable range) +- 调整工作流资源使用限制逻辑,在允许的范围内提升更新速度(Adjusted the logic of workflow resource usage limit, increase + the update speed within the allowable range) ## v1.0.6 ### 2024/4/12 -- 恢复工作流更新,请谨慎合理使用,勿尝试更改默认运行参数,可能导致封禁的风险!首推使用本地更新(Workflow updates have been restored. Please use them carefully and do not attempt to change the default runtime parameters, as this may risk being banned! It is recommended to use local updates first.) -- 调整默认配置参数,降低单次更新运行时长(Adjusted the default configuration parameters to reduce the runtime of a single update.) -- 依赖版本锁定,解决可能出现的环境错误(#72)(Dependency versions have been locked to solve potential environmental errors (#72).) -- 优化逻辑与增加检测,避免网络异常占用工作流运行(Optimized logic and added checks to prevent network anomalies from occupying workflow operations.) +- 恢复工作流更新,请谨慎合理使用,勿尝试更改默认运行参数,可能导致封禁的风险!首推使用本地更新(Workflow updates have been + restored. Please use them carefully and do not attempt to change the default runtime parameters, as this may risk + being banned! It is recommended to use local updates first.) +- 调整默认配置参数,降低单次更新运行时长(Adjusted the default configuration parameters to reduce the runtime of a single + update.) +- 依赖版本锁定,解决可能出现的环境错误(#72)(Dependency versions have been locked to solve potential environmental + errors (#72).) +- 优化逻辑与增加检测,避免网络异常占用工作流运行(Optimized logic and added checks to prevent network anomalies from + occupying workflow operations.) ## v1.0.5 ### 2024/4/10 -- 移除工作流更新,鉴于有少数人反馈工作流甚至账号被封禁的情况,安全起见,只能暂时移除工作流更新机制,后续将增加其它平台部署方案(Removed workflow updates, in view of the feedback from a few people that their workflows and even accounts have been banned, for safety reasons, the workflow update mechanism can only be temporarily removed, and other platform deployment plans will be added in the future) -- 新增本地更新,同时移除更新频道个数限制,具体使用方法请见快速上手(Added local updates and removed the limit on the number of channel updates. For specific usage, please see the quick start guide) +- 移除工作流更新,鉴于有少数人反馈工作流甚至账号被封禁的情况,安全起见,只能暂时移除工作流更新机制,后续将增加其它平台部署方案(Removed + workflow updates, in view of the feedback from a few people that their workflows and even accounts have been banned, + for safety reasons, the workflow update mechanism can only be temporarily removed, and other platform deployment plans + will be added in the future) +- 新增本地更新,同时移除更新频道个数限制,具体使用方法请见快速上手(Added local updates and removed the limit on the number + of channel updates. For specific usage, please see the quick start guide) - 适配提供方接口位置变更(Adapted to the change of the provider's interface location) ## v1.0.4 @@ -548,8 +635,11 @@ ### 2024/4/8 - 更新 Github 使用条款,请务必仔细阅读并遵守(Updated GitHub Terms of Service, please read and comply carefully) -- 更新使用说明,关于可能导致工作流资源滥用的情况说明(Updated usage instructions, explanation about situations that may lead to workflow resource abuse) -- 增加.gitignore 文件,忽略用户配置、接口更新结果、日志文件等上传,非代码逻辑修改请不要发起 Pull requests,避免影响他人使用(Added .gitignore file to ignore uploads of user configurations, interface update results, log files, etc. Please do not initiate pull requests for non-code logic modifications to avoid affecting others' use) +- 更新使用说明,关于可能导致工作流资源滥用的情况说明(Updated usage instructions, explanation about situations that may + lead to workflow resource abuse) +- 增加.gitignore 文件,忽略用户配置、接口更新结果、日志文件等上传,非代码逻辑修改请不要发起 Pull requests,避免影响他人使用(Added + .gitignore file to ignore uploads of user configurations, interface update results, log files, etc. Please do not + initiate pull requests for non-code logic modifications to avoid affecting others' use) - 调整更新频率,北京时间每日 8:00 执行一次(Adjusted update frequency, executes once daily at 8:00 am Beijing time) - 调整更新频道数量上限(200 个)(Adjusted the maximum limit for updating channel numbers (200)) @@ -559,19 +649,22 @@ - 新增接口域名黑名单(Add interface domain blacklist) - 新增接口关键字黑名单(Add interface keyword blacklist) -- 调整过滤逻辑执行顺序,提升工作流更新效率(Adjust the execution order of the filtering logic to improve workflow update efficiency) +- 调整过滤逻辑执行顺序,提升工作流更新效率(Adjust the execution order of the filtering logic to improve workflow update + efficiency) ## v1.0.2 ### 2024/4/5 -- 修复用户配置后接口更新结果与日志文件命名问题(Fix the issue of interface update results and log file naming after user configuration) +- 修复用户配置后接口更新结果与日志文件命名问题(Fix the issue of interface update results and log file naming after user + configuration) ## v1.0.1 ### 2024/4/1 -- 适配接口提供方变更,调整接口链接与信息提取方法(Adapt to changes from the interface provider, adjust the interface link and information extraction method) +- 适配接口提供方变更,调整接口链接与信息提取方法(Adapt to changes from the interface provider, adjust the interface link + and information extraction method) --- @@ -598,7 +691,10 @@ ### 2024/3/25 -- 增加代码防覆盖,用户可使用 user\_作为文件前缀以区分独有配置,可避免在合并更新时本地代码被上游仓库代码覆盖,如 user_config.py、user_demo.txt、user_result.txt(Add code anti-overwriting. Users can use user\_ as the file prefix to distinguish unique configurations. This prevents local codes from being overwritten by upstream repository codes, such as user_config.py, user_demo.txt, and user_result.txt, when merging updates) +- 增加代码防覆盖,用户可使用 user\_作为文件前缀以区分独有配置,可避免在合并更新时本地代码被上游仓库代码覆盖,如 + user_config.py、user_demo.txt、user_result.txt(Add code anti-overwriting. Users can use user\_ as the file prefix to + distinguish unique configurations. This prevents local codes from being overwritten by upstream repository codes, such + as user_config.py, user_demo.txt, and user_result.txt, when merging updates) --- @@ -606,7 +702,9 @@ - 修复潜在的更新文件追踪失效,导致更新失败(Fixed potential tracking failure of updated files, leading to update failure) - 调整最近更新获取时间默认为 30 天(Adjusted the default recent update retrieval time to 30 days) -- 优化最近更新接口筛选,当筛选后不足指定接口个数时,将使用其它时间范围的可用接口补充(Optimized the recent update interface filter, when the number of interfaces is insufficient after filtering, other time range available interfaces will be used for supplementation) +- 优化最近更新接口筛选,当筛选后不足指定接口个数时,将使用其它时间范围的可用接口补充(Optimized the recent update interface + filter, when the number of interfaces is insufficient after filtering, other time range available interfaces will be + used for supplementation) - 优化珠江、CCTV 频道匹配问题(Optimized the matching problem of Zhujiang and CCTV channels) - 移除推送实时触发更新(Removed push real-time trigger update) @@ -614,9 +712,11 @@ ### 2024/3/18 -- 新增配置项:ipv_type,用于过滤 ipv4、ipv6 接口类型(Added configuration item: ipv_type, used to filter ipv4, ipv6 interface types) +- 新增配置项:ipv_type,用于过滤 ipv4、ipv6 接口类型(Added configuration item: ipv_type, used to filter ipv4, ipv6 + interface types) - 优化文件更新逻辑,避免更新失效引起文件丢失(Optimized file update logic to prevent file loss caused by update failure) -- 调整分页获取默认值:关注频道获取 6 页,常规频道获取 4 页,以提升更新速度(Adjusted the default value for pagination: fetch 6 pages for followed channels, 4 pages for regular channels, to improve update speed) +- 调整分页获取默认值:关注频道获取 6 页,常规频道获取 4 页,以提升更新速度(Adjusted the default value for pagination: fetch + 6 pages for followed channels, 4 pages for regular channels, to improve update speed) - 增加接口日志文件 result.log 输出(Added output of interface log file result.log) - 修复权重排序异常(Fixed weight sorting anomaly) @@ -632,8 +732,10 @@ ### 2024/3/13 -- 增加配置项:recent_days,筛选获取最近时间范围内更新的接口,默认最近 60 天(Added configuration item: recent_days, a filter to get the most recently updated interfaces, default to the last 60 days) -- 调整默认值:关注频道获取 8 页,常规频道获取 5 页(Adjusted default values: fetch 8 pages for followed channels, 5 pages for regular channels) +- 增加配置项:recent_days,筛选获取最近时间范围内更新的接口,默认最近 60 天(Added configuration item: recent_days, a filter + to get the most recently updated interfaces, default to the last 60 days) +- 调整默认值:关注频道获取 8 页,常规频道获取 5 页(Adjusted default values: fetch 8 pages for followed channels, 5 pages + for regular channels) --- @@ -646,6 +748,9 @@ ### 2024/3/4 - 增加配置项:响应时间与分辨率权重值(Added configuration items: response time and resolution weight values) -- 移除配置项:是否过滤无效接口,始终执行过滤(Removed configuration items: whether to filter invalid interfaces, always perform filtering) -- 移除按日期排序,采用响应时间与分辨率作为排序规则(Removed sorting by date, using response time and resolution as sorting rules) -- 更新 README:增加修改更新频率、文件代理说明、更新日志(Updated README: added modification update frequency, file proxy description, update log) +- 移除配置项:是否过滤无效接口,始终执行过滤(Removed configuration items: whether to filter invalid interfaces, always + perform filtering) +- 移除按日期排序,采用响应时间与分辨率作为排序规则(Removed sorting by date, using response time and resolution as sorting + rules) +- 更新 README:增加修改更新频率、文件代理说明、更新日志(Updated README: added modification update frequency, file proxy + description, update log) diff --git a/config/config.ini b/config/config.ini index 879e7d6..b01a4e5 100644 --- a/config/config.ini +++ b/config/config.ini @@ -23,16 +23,16 @@ ipv6_num = 5 open_m3u_result = True url_keywords_blacklist = epg.pw,skype.serv00.net,iptv.yjxfz.com,live-hls-web-ajb.getaj.net,live.goodiptv.club,hc73k3dhwo5gfkt.wcetv.com,stream1.freetv.fun,zw9999.cnstream.top open_subscribe = True -subscribe_urls = https://live.fanmingming.com/tv/m3u/ipv6.m3u,https://ghp.ci/https://raw.githubusercontent.com/joevess/IPTV/main/home.m3u8,https://aktv.top/live.txt,http://175.178.251.183:6689/live.txt,https://ghp.ci/https://raw.githubusercontent.com/kimwang1978/collect-tv-txt/main/merged_output.txt,https://m3u.ibert.me/txt/fmml_dv6.txt,https://m3u.ibert.me/txt/o_cn.txt,https://m3u.ibert.me/txt/j_iptv.txt,https://github.moeyy.xyz/https://raw.githubusercontent.com/PizazzGY/TVBox/main/live.txt,https://ghp.ci/https://raw.githubusercontent.com/xzw832/cmys/main/S_CCTV.txt,https://ghp.ci/https://raw.githubusercontent.com/xzw832/cmys/main/S_weishi.txt,http://itv.22m.top/ITVBox/tv/tvonline.txt +subscribe_urls = https://live.zbds.top/tv/iptv6.txt,https://live.zbds.top/tv/iptv4.txt,https://live.fanmingming.com/tv/m3u/ipv6.m3u,https://ghp.ci/https://raw.githubusercontent.com/joevess/IPTV/main/home.m3u8,https://aktv.top/live.txt,http://175.178.251.183:6689/live.txt,https://ghp.ci/https://raw.githubusercontent.com/kimwang1978/collect-tv-txt/main/merged_output.txt,https://m3u.ibert.me/txt/fmml_dv6.txt,https://m3u.ibert.me/txt/o_cn.txt,https://m3u.ibert.me/txt/j_iptv.txt,https://ghp.ci/https://raw.githubusercontent.com/xzw832/cmys/main/S_CCTV.txt,https://ghp.ci/https://raw.githubusercontent.com/xzw832/cmys/main/S_weishi.txt,http://itv.22m.top/ITVBox/tv/tvonline.txt,https://ghp.ci//https://raw.githubusercontent.com/asdjkl6/tv/tv/.m3u/整套直播源/测试/整套直播源/l.txt,https://ghp.ci//https://raw.githubusercontent.com/asdjkl6/tv/tv/.m3u/整套直播源/测试/整套直播源/kk.txt open_multicast = True -open_multicast_foodie = True +open_multicast_foodie = False open_multicast_fofa = True multicast_region_list = 全部 multicast_page_num = 1 open_proxy = False open_driver = True open_hotel = True -open_hotel_foodie = True +open_hotel_foodie = False open_hotel_fofa = True hotel_region_list = 全部 hotel_page_num = 1 diff --git a/config/demo.txt b/config/demo.txt index 32c4005..84ff634 100644 --- a/config/demo.txt +++ b/config/demo.txt @@ -1247,18 +1247,6 @@ BTV纪实 宁夏少儿 宁夏电视台影视 石嘴山综合 -安多卫视 -门源综合 -化隆综合 -民和综合 -兴海综合 -大通电视台 -湟中电视台 -西宁新闻综合 -西宁生活服务 -青海经视 -青海都市 -青海综合 ☘️吉林频道,#genre# 延边卫视 @@ -1372,6 +1360,13 @@ BTV纪实 门源综合 贵南综合 化隆综合 +民和综合 +兴海综合 +大通电视台 +湟中电视台 +青海经视 +青海都市 +青海综合 ☘️黑龙江频道,#genre# 黑龙江文体 diff --git a/updates/fofa/fofa_hotel_region_result.pkl b/updates/fofa/fofa_hotel_region_result.pkl index 41a9755..adb8c07 100644 Binary files a/updates/fofa/fofa_hotel_region_result.pkl and b/updates/fofa/fofa_hotel_region_result.pkl differ diff --git a/updates/fofa/request.py b/updates/fofa/request.py index 26b3195..0d3b9f1 100644 --- a/updates/fofa/request.py +++ b/updates/fofa/request.py @@ -1,19 +1,21 @@ -from tqdm.asyncio import tqdm_asyncio -from time import time -from requests import get -from concurrent.futures import ThreadPoolExecutor, as_completed -import updates.fofa.fofa_map as fofa_map -import re -from utils.config import config -import utils.constants as constants -from utils.retry import retry_func -from utils.channel import format_channel_name -from utils.tools import merge_objects, get_pbar_remaining, add_url_info, resource_path -from updates.proxy import get_proxy, get_proxy_next -from requests_custom.utils import get_source_requests, close_session -from collections import defaultdict import pickle +import re import threading +from collections import defaultdict +from concurrent.futures import ThreadPoolExecutor, as_completed +from time import time + +from requests import get +from tqdm.asyncio import tqdm_asyncio + +import updates.fofa.fofa_map as fofa_map +import utils.constants as constants +from requests_custom.utils import get_source_requests, close_session +from updates.proxy import get_proxy, get_proxy_next +from utils.channel import format_channel_name +from utils.config import config +from utils.retry import retry_func +from utils.tools import merge_objects, get_pbar_remaining, add_url_info, resource_path def get_fofa_urls_from_region_list(): @@ -44,10 +46,10 @@ def update_fofa_region_result_tmp(result, multicast=False): tmp_result = get_fofa_region_result_tmp(multicast=multicast) total_result = merge_objects(tmp_result, result) with open( - resource_path( - f"updates/fofa/fofa_{'multicast' if multicast else 'hotel'}_region_result.pkl" - ), - "wb", + resource_path( + f"updates/fofa/fofa_{'multicast' if multicast else 'hotel'}_region_result.pkl" + ), + "wb", ) as file: pickle.dump(total_result, file) @@ -55,10 +57,10 @@ def update_fofa_region_result_tmp(result, multicast=False): def get_fofa_region_result_tmp(multicast: False): try: with open( - resource_path( - f"updates/fofa/fofa_{'multicast' if multicast else 'hotel'}_region_result.pkl" - ), - "rb", + resource_path( + f"updates/fofa/fofa_{'multicast' if multicast else 'hotel'}_region_result.pkl" + ), + "rb", ) as file: return pickle.load(file) except: @@ -119,7 +121,7 @@ async def get_channels_by_fofa(urls=None, multicast=False, callback=None): page_source = retry_func( lambda: get_source_requests(fofa_url), name=fofa_url ) - if "禁止访问" in page_source or "资源访问每天限制" in page_source: + if any(keyword in page_source for keyword in ["访问异常", "禁止访问", "资源访问每天限制"]): cancel_event.set() raise ValueError("Limited access to fofa page") fofa_source = re.sub(r"", "", page_source, flags=re.DOTALL) diff --git a/utils/speed.py b/utils/speed.py index 00d2103..143b69d 100644 --- a/utils/speed.py +++ b/utils/speed.py @@ -1,14 +1,14 @@ -from aiohttp import ClientSession, TCPConnector -from time import time import asyncio import re -from utils.config import config -import utils.constants as constants -from utils.tools import is_ipv6, remove_cache_info, get_resolution_value, get_logger import subprocess +from time import time + import yt_dlp -from concurrent.futures import ProcessPoolExecutor -import functools +from aiohttp import ClientSession, TCPConnector + +import utils.constants as constants +from utils.config import config +from utils.tools import is_ipv6, remove_cache_info, get_resolution_value, get_logger logger = get_logger(constants.log_path) @@ -34,26 +34,19 @@ async def get_speed_yt_dlp(url, timeout=config.sort_timeout): Get the speed of the url by yt_dlp """ try: - async with asyncio.timeout(timeout + 2): - start_time = time() - loop = asyncio.get_running_loop() - with ProcessPoolExecutor() as exc: - info = await loop.run_in_executor( - exc, functools.partial(get_info_yt_dlp, url, timeout) - ) - fps = ( - int(round((time() - start_time) * 1000)) - if len(info) - else float("inf") - ) - resolution = ( - f"{info['width']}x{info['height']}" - if "width" in info and "height" in info - else None - ) - return (fps, resolution) + start_time = time() + info = await asyncio.wait_for( + asyncio.to_thread(get_info_yt_dlp, url, timeout), timeout=timeout + ) + fps = int(round((time() - start_time) * 1000)) if len(info) else float("inf") + resolution = ( + f"{info['width']}x{info['height']}" + if "width" in info and "height" in info + else None + ) + return fps, resolution except: - return (float("inf"), None) + return float("inf"), None async def get_speed_requests(url, timeout=config.sort_timeout, proxy=None): @@ -61,7 +54,7 @@ async def get_speed_requests(url, timeout=config.sort_timeout, proxy=None): Get the speed of the url by requests """ async with ClientSession( - connector=TCPConnector(verify_ssl=False), trust_env=True + connector=TCPConnector(verify_ssl=False), trust_env=True ) as session: start = time() end = None @@ -153,7 +146,7 @@ async def check_stream_speed(url_info): if frame is None or frame == float("inf"): return float("inf") url_info[2] = resolution - return (url_info, frame) + return url_info, frame except Exception as e: print(e) return float("inf") @@ -164,7 +157,7 @@ speed_cache = {} async def get_speed(url, ipv6_proxy=None, callback=None): """ - Get the speed of the url + Get the speed (response time and resolution) of the url """ try: cache_key = None @@ -177,14 +170,14 @@ async def get_speed(url, ipv6_proxy=None, callback=None): if cache_key in speed_cache: return speed_cache[cache_key][0] if ipv6_proxy and url_is_ipv6: - speed = 0 + speed = (0, None) else: speed = await get_speed_yt_dlp(url) if cache_key and cache_key not in speed_cache: speed_cache[cache_key] = speed return speed except: - return float("inf") + return float("inf"), None finally: if callback: callback() @@ -224,8 +217,8 @@ def sort_urls_by_speed_and_resolution(name, data, logger=None): else: resolution_value = get_resolution_value(resolution) if resolution else 0 return ( - config.response_time_weight * response_time - - config.resolution_weight * resolution_value + config.response_time_weight * response_time + - config.resolution_weight * resolution_value ) filter_data.sort(key=combined_key) diff --git a/version.json b/version.json index e1c14d6..92f3eb0 100644 --- a/version.json +++ b/version.json @@ -1,4 +1,4 @@ { - "version": "1.5.4", + "version": "1.5.5", "name": "IPTV-API" } \ No newline at end of file