Skip to content

Commit

Permalink
Merge pull request #218 from Guovin/master
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
Guovin authored Jul 31, 2024
2 parents 0431b35 + 9b24182 commit 35528c9
Show file tree
Hide file tree
Showing 8 changed files with 164 additions and 75 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# 更新日志(Changelog)

## 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))

## v1.3.3

### 2024/7/19
Expand Down
2 changes: 2 additions & 0 deletions config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
open_update = True
open_use_old_result = True
source_file = "demo.txt"
final_file = "result.txt"
favorite_list = [
Expand All @@ -18,6 +19,7 @@
favorite_page_num = 5
default_page_num = 3
urls_limit = 15
open_keep_all = False
open_sort = True
response_time_weight = 0.5
resolution_weight = 0.5
Expand Down
2 changes: 2 additions & 0 deletions docs/config.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
| 配置项 | 默认值 | 描述 |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
| open_update | True | 开启更新,若关闭则只运行结果页面服务 |
| open_use_old_result | True | 开启使用历史更新结果,合并至本次更新中 |
| open_driver | False | 开启浏览器运行,若更新无数据可开启此模式,较消耗性能 |
| open_proxy | True | 开启代理,自动获取免费可用代理,若更新无数据可开启此模式 |
| source_file | "demo.txt" | 模板文件名称 |
Expand All @@ -10,6 +11,7 @@
| favorite_page_num | 5 | 关注频道获取分页数量 |
| default_page_num | 3 | 常规频道获取分页数量 |
| urls_limit | 10 | 单个频道接口数量 |
| open_keep_all | False | 保留所有检索结果,会保留非模板频道名称的结果,推荐手动维护时开启 |
| open_sort | True | 开启排序功能(响应速度、日期、分辨率) |
| response_time_weight | 0.5 | 响应时间权重值(所有权重值总和应为 1) |
| resolution_weight | 0.5 | 分辨率权重值 (所有权重值总和应为 1) |
Expand Down
48 changes: 25 additions & 23 deletions docs/config_en.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
| Configuration Item | Default Value | Description |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| open_update | True | Enable updates, if disabled then only the result page service is run |
| open_driver | False | Enable browser execution, If there are no updates, this mode can be enabled, which consumes more performance |
| open_proxy | True | Enable proxy, automatically obtains free available proxies, If there are no updates, this mode can be enabled |
| 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) |
| open_online_search | False | Enable online search source feature |
| favorite_page_num | 5 | Page retrieval quantity for favorite channels |
| default_page_num | 3 | Page retrieval quantity for regular channels |
| urls_limit | 10 | Number of interfaces per channel |
| open_sort | True | Enable the sorting function (response speed, date, resolution) |
| response_time_weight | 0.5 | Response time weight value (the sum of all weight values should be 1) |
| resolution_weight | 0.5 | Resolution weight value (the sum of all weight values should be 1) |
| recent_days | 30 | Retrieve interfaces updated within a recent time range (in days), reducing appropriately can avoid matching issues |
| ipv_type | "ipv4" | The type of interface in the generated result, optional values: "ipv4", "ipv6", "all" |
| domain_blacklist | ["epg.pw"] | Interface domain blacklist, used to filter out interfaces with low-quality, ad-inclusive domains |
| url_keywords_blacklist | [] | Interface keyword blacklist, used to filter out interfaces containing specific characters |
| open_subscribe | True | Enable subscription source feature |
| 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"] | Subscription source list |
| open_multicast | True | Enable multicast source function |
| region_list | ["all"] | Multicast source region list, [more regions](./fofa_map.py, "all" means all regions) |
| Configuration Item | Default Value | Description |
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| open_update | True | Enable updates, if disabled then only the result page service is run |
| open_use_old_result | True | Enable the use of historical update results and merge them into the current update |
| open_driver | False | Enable browser execution, If there are no updates, this mode can be enabled, which consumes more performance |
| open_proxy | True | Enable proxy, automatically obtains free available proxies, If there are no updates, this mode can be enabled |
| 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) |
| open_online_search | False | Enable online search source feature |
| favorite_page_num | 5 | Page retrieval quantity for favorite channels |
| default_page_num | 3 | Page retrieval quantity for regular channels |
| urls_limit | 10 | Number of interfaces per channel |
| open_keep_all | False | Retain all search results, retain results with non-template channel names, recommended to be turned on when manually maintaining |
| open_sort | True | Enable the sorting function (response speed, date, resolution) |
| response_time_weight | 0.5 | Response time weight value (the sum of all weight values should be 1) |
| resolution_weight | 0.5 | Resolution weight value (the sum of all weight values should be 1) |
| recent_days | 30 | Retrieve interfaces updated within a recent time range (in days), reducing appropriately can avoid matching issues |
| ipv_type | "ipv4" | The type of interface in the generated result, optional values: "ipv4", "ipv6", "all" |
| domain_blacklist | ["epg.pw"] | Interface domain blacklist, used to filter out interfaces with low-quality, ad-inclusive domains |
| url_keywords_blacklist | [] | Interface keyword blacklist, used to filter out interfaces containing specific characters |
| open_subscribe | True | Enable subscription source feature |
| 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"] | Subscription source list |
| open_multicast | True | Enable multicast source function |
| region_list | ["all"] | Multicast source region list, [more regions](./fofa_map.py, "all" means all regions) |
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from utils.channel import (
get_channel_items,
append_data_to_info_data,
append_all_method_data,
append_total_data,
sort_channel_list,
write_channel_to_file,
)
Expand Down Expand Up @@ -86,7 +86,7 @@ async def main(self):
self.total = len(channel_names)
await self.visit_page(channel_names)
self.tasks = []
self.channel_data = append_all_method_data(
self.channel_data = append_total_data(
self.channel_items.items(),
self.channel_data,
self.subscribe_result,
Expand Down
Loading

0 comments on commit 35528c9

Please sign in to comment.