mirror of
https://github.com/qist/tvbox.git
synced 2026-06-21 09:03:22 +00:00
修改
This commit is contained in:
4
.github/workflows/run.yml
vendored
4
.github/workflows/run.yml
vendored
@@ -38,7 +38,9 @@ jobs:
|
|||||||
\cp -pdr dianshi_merged_with_app_sites.json ../dianshi.json
|
\cp -pdr dianshi_merged_with_app_sites.json ../dianshi.json
|
||||||
\cp -pdr jsm_merged_with_app_sites.json ../jsm.json
|
\cp -pdr jsm_merged_with_app_sites.json ../jsm.json
|
||||||
\cp -pdr fan.txt ../jar/fan.txt
|
\cp -pdr fan.txt ../jar/fan.txt
|
||||||
rm -rf dianshi_merged_with_app_sites.json jsm_merged_with_app_sites.json dianshi_merged.json jsm_merged.json tvbox_cleaned.json fan.txt
|
git clone --depth=1 --recursive https://github.com/fantaiying7/EXT.git
|
||||||
|
\cp -pdr EXT/* ../FTY/
|
||||||
|
rm -rf dianshi_merged_with_app_sites.json jsm_merged_with_app_sites.json dianshi_merged.json jsm_merged.json tvbox_cleaned.json fan.txt EXT
|
||||||
cd ../
|
cd ../
|
||||||
shell: bash
|
shell: bash
|
||||||
- name: Git push assets to "release" branch
|
- name: Git push assets to "release" branch
|
||||||
|
|||||||
17
tools/fty.py
17
tools/fty.py
@@ -45,17 +45,26 @@ def extract_and_save_spider(json_text):
|
|||||||
|
|
||||||
# 删除不需要的 sites 项 + 替换链接
|
# 删除不需要的 sites 项 + 替换链接
|
||||||
def clean_data(raw_text):
|
def clean_data(raw_text):
|
||||||
raw_text = raw_text.replace(
|
# 统一把各种 GitHub 代理壳替换掉
|
||||||
"https://gh-proxy.net/https://raw.githubusercontent.com/fantaiying7/EXT/refs/heads/main",
|
raw_text = re.sub(
|
||||||
"./FTY"
|
r'https?://[^/]+/https://raw\.githubusercontent\.com/fantaiying7/EXT/refs/heads/main',
|
||||||
|
'./FTY',
|
||||||
|
raw_text
|
||||||
)
|
)
|
||||||
|
|
||||||
data = demjson.decode(raw_text)
|
data = demjson.decode(raw_text)
|
||||||
|
|
||||||
keywords = [
|
keywords = [
|
||||||
"豆", "饭太硬", "广告", "PanSso", "YpanSo", "xzso", "米搜", "夸搜", "Aliso", "YiSo"
|
"豆", "饭太硬", "广告", "PanSso", "YpanSo", "xzso", "米搜", "夸搜", "Aliso", "YiSo"
|
||||||
]
|
]
|
||||||
|
|
||||||
original_count = len(data.get("sites", []))
|
original_count = len(data.get("sites", []))
|
||||||
data["sites"] = [s for s in data["sites"] if not any(kw in s.get("key", "") or kw in s.get("name", "") for kw in keywords)]
|
|
||||||
|
data["sites"] = [
|
||||||
|
s for s in data["sites"]
|
||||||
|
if not any(kw in s.get("key", "") or kw in s.get("name", "") for kw in keywords)
|
||||||
|
]
|
||||||
|
|
||||||
print(f"🧹 清理 {original_count - len(data['sites'])} 条 sites")
|
print(f"🧹 清理 {original_count - len(data['sites'])} 条 sites")
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user