Skip to content

Commit 2754b45

Browse files
committed
remove:domain_blacklist
1 parent 4197314 commit 2754b45

File tree

7 files changed

+2
-56
lines changed

7 files changed

+2
-56
lines changed

config/config.ini

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ ipv_type = 全部
2020
ipv_type_prefer = 自动
2121
ipv4_num = 5
2222
ipv6_num = 5
23-
domain_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
2423
open_m3u_result = True
25-
url_keywords_blacklist =
24+
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
2625
open_subscribe = True
2726
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://ghproxy.net/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://ghproxy.net/https://raw.githubusercontent.com/xzw832/cmys/main/S_CCTV.txt,https://ghproxy.net/https://raw.githubusercontent.com/xzw832/cmys/main/S_weishi.txt,http://itv.22m.top/ITVBox/tv/tvonline.txt
2827
open_multicast = True

docs/config.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
| ipv_type_prefer | 自动 | 接口协议类型偏好,优先将该类型的接口排在结果前面,可选值:IPv4、IPv6、自动、auto |
2525
| ipv4_num | 5 | 结果中偏好的 IPv4 接口数量 |
2626
| ipv6_num | 5 | 结果中偏好的 IPv6 接口数量 |
27-
| domain_blacklist | epg.pw | 接口域名黑名单,用于过滤低质量含广告类域名的接口 |
2827
| url_keywords_blacklist | | 接口关键字黑名单,用于过滤含特定字符的接口 |
2928
| open_subscribe | False | 开启订阅源功能 |
3029
| subscribe_urls | | 订阅源,请输入订阅链接(支持 txt 与 m3u 链接),多个链接以逗号分隔 |

docs/config_en.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
| ipv_type_prefer | auto | Interface protocol type preference, prioritize interfaces of this type in the results, optional values: IPv4, IPv6, auto |
2525
| ipv4_num | 5 | The preferred number of IPv4 interfaces in the result |
2626
| ipv6_num | 5 | The preferred number of IPv6 interfaces in the result |
27-
| domain_blacklist | | Interface domain blacklist, used to filter out interfaces with low-quality, ad-inclusive domains |
2827
| url_keywords_blacklist | | Interface keyword blacklist, used to filter out interfaces containing specific characters |
2928
| open_subscribe | True | Enable subscription source feature |
3029
| subscribe_urls | | Subscription source, please enter the subscription link (supports txt and m3u links), multiple links should be separated by commas |

tkinter_ui/default.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -372,22 +372,6 @@ def init_ui(self, root):
372372
)
373373
self.open_empty_category_checkbutton.pack(side=tk.LEFT, padx=4, pady=8)
374374

375-
frame_default_domain_blacklist = tk.Frame(root)
376-
frame_default_domain_blacklist.pack(fill=tk.X)
377-
378-
self.domain_blacklist_label = tk.Label(
379-
frame_default_domain_blacklist, text="域名黑名单:", width=12
380-
)
381-
self.domain_blacklist_label.pack(side=tk.LEFT, padx=4, pady=8)
382-
self.domain_blacklist_text = scrolledtext.ScrolledText(
383-
frame_default_domain_blacklist, height=2
384-
)
385-
self.domain_blacklist_text.pack(
386-
side=tk.LEFT, padx=4, pady=8, expand=True, fill=tk.BOTH
387-
)
388-
self.domain_blacklist_text.insert(tk.END, ",".join(config.domain_blacklist))
389-
self.domain_blacklist_text.bind("<KeyRelease>", self.update_domain_blacklist)
390-
391375
frame_default_url_keywords_blacklist = tk.Frame(root)
392376
frame_default_url_keywords_blacklist.pack(fill=tk.X)
393377

@@ -503,13 +487,6 @@ def update_url_keywords_blacklist(self, event):
503487
self.url_keywords_blacklist_text.get(1.0, tk.END),
504488
)
505489

506-
def update_domain_blacklist(self, event):
507-
config.set(
508-
"Settings",
509-
"domain_blacklist",
510-
self.domain_blacklist_text.get(1.0, tk.END),
511-
)
512-
513490
def update_url_keywords_blacklist(self, event):
514491
config.set(
515492
"Settings",
@@ -541,7 +518,6 @@ def change_entry_state(self, state):
541518
"open_url_info_checkbutton",
542519
"open_empty_category_checkbutton",
543520
"ipv_type_combo",
544-
"domain_blacklist_text",
545521
"url_keywords_blacklist_text",
546522
]:
547523
getattr(self, entry).config(state=state)

tkinter_ui/tkinter_ui.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ def save_config(self):
5858
"response_time_weight": self.default_ui.response_time_weight_scale.get(),
5959
"resolution_weight": self.default_ui.resolution_weight_scale.get(),
6060
"ipv_type": self.default_ui.ipv_type_combo.get(),
61-
"domain_blacklist": self.default_ui.domain_blacklist_text.get(1.0, tk.END),
6261
"url_keywords_blacklist": self.default_ui.url_keywords_blacklist_text.get(
6362
1.0, tk.END
6463
),

utils/config.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -147,16 +147,6 @@ def open_url_info(self):
147147
def recent_days(self):
148148
return self.config.getint("Settings", "recent_days", fallback=30)
149149

150-
@property
151-
def domain_blacklist(self):
152-
return [
153-
domain.strip()
154-
for domain in self.config.get(
155-
"Settings", "domain_blacklist", fallback=""
156-
).split(",")
157-
if domain.strip()
158-
]
159-
160150
@property
161151
def url_keywords_blacklist(self):
162152
return [

utils/tools.py

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -274,17 +274,6 @@ def check_url_ipv_type(url):
274274
)
275275

276276

277-
def check_by_domain_blacklist(url):
278-
"""
279-
Check by domain blacklist
280-
"""
281-
domain_blacklist = {
282-
(urlparse(domain).netloc if urlparse(domain).scheme else domain)
283-
for domain in config.domain_blacklist
284-
}
285-
return urlparse(url).netloc not in domain_blacklist
286-
287-
288277
def check_by_url_keywords_blacklist(url):
289278
"""
290279
Check by URL blacklist keywords
@@ -296,19 +285,14 @@ def check_url_by_patterns(url):
296285
"""
297286
Check the url by patterns
298287
"""
299-
return (
300-
check_url_ipv_type(url)
301-
and check_by_domain_blacklist(url)
302-
and check_by_url_keywords_blacklist(url)
303-
)
288+
return check_url_ipv_type(url) and check_by_url_keywords_blacklist(url)
304289

305290

306291
def filter_urls_by_patterns(urls):
307292
"""
308293
Filter urls by patterns
309294
"""
310295
urls = [url for url in urls if check_url_ipv_type(url)]
311-
urls = [url for url in urls if check_by_domain_blacklist(url)]
312296
urls = [url for url in urls if check_by_url_keywords_blacklist(url)]
313297
return urls
314298

0 commit comments

Comments
 (0)