From e2ead162bf060556a08ec5ab6bf484e42d8c21e2 Mon Sep 17 00:00:00 2001 From: Shawn <45581750+KOP-XIAO@users.noreply.github.com> Date: Sun, 26 Mar 2023 15:17:05 +0800 Subject: [PATCH] Update resource-parser.js --- Scripts/resource-parser.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Scripts/resource-parser.js b/Scripts/resource-parser.js index 433deb8..a90e3c4 100644 --- a/Scripts/resource-parser.js +++ b/Scripts/resource-parser.js @@ -1,5 +1,5 @@ /** -☑️ 资源解析器 ©𝐒𝐡𝐚𝐰𝐧 ⟦2023-03-25 21:35⟧ +☑️ 资源解析器 ©𝐒𝐡𝐚𝐰𝐧 ⟦2023-03-26 15:05⟧ ---------------------------------------------------------- 🛠 发现 𝐁𝐔𝐆 请反馈: https://t.me/Shawn_Parser_Bot ⛳️ 关注 🆃🅶 相关频道: https://t.me/QuanX_API @@ -2485,7 +2485,7 @@ function get_emoji(emojip, sname) { "🇬🇹": ["危地马拉", " GT "], "🇭🇰": ["HK", "Hongkong", "Hong Kong", "HongKong", "HONG KONG","香港", "深港", "沪港", "呼港", "HKT", "HKBN", "HGC", "WTT", "CMI", "穗港", "京港", "港"], "🇨🇳": ["CN", "China", "回国", "中国","中國", "江苏", "北京", "上海", "广州", "深圳", "杭州", "徐州", "青岛", "宁波", "镇江", "back"], - "🇬🇺": [" 关岛"], + "🇬🇺": ["关岛"], "🇱🇧": ["黎巴嫩","LB", "Lebanon"], "🇧🇳": ["文莱","BRN","Negara Brunei Darussalam"], "🌏": ["亚洲","Asia"] @@ -2764,7 +2764,7 @@ function YAMLFix(cnt){ if(Pdbg == 1) { $notify("part-fix0:","","part-fix0:\nproxies:\n"+cnt.split("proxies:")[1])} // 2023-03-23 👇修正部分类型 - cnt = cnt.replace(/\n\s{2}([a-zA-Z]+.*\:)/g,"\n $1") + cnt = cnt.replace(/\n\s{2}([a-zA-Z]+.*\:)/g,"\n $1").replace(/\n(\-.*)/g,"\n $1") if(Pdbg == 1) { $notify("part-fix1:","","part-fix1:\nproxies:\n"+cnt.split("proxies:")[1])} // cnt = cnt.indexOf("proxies:") == -1? "proxies:\n" + cnt :"proxies:"+cnt.split("proxies:")[1] @@ -2778,7 +2778,7 @@ function YAMLFix(cnt){ //2022-09-01 remove host in s{6}(H|h)ost //cnt = cnt.indexOf("proxies:") != -1?cnt.replace(/\n\s{4}headers/g,"\n headers").replace(/\n\s{6}Host/g,"\n Host").replace(/\t/g,""):cnt //2022-11-29 修改 - cnt = cnt.indexOf("proxies:") != -1 && cnt.indexOf("\n\s{4}server")!=-1 ? cnt.replace(/\n\s{4}headers/g,"\n headers").replace(/\n\s{6}Host/g,"\n Host").replace(/\t/g,""):cnt + cnt = cnt.indexOf("proxies:") != -1 && /\n\s{4}server/.test(cnt) ? cnt.replace(/\n\s{4}(headers|path)/g,"\n $1").replace(/\n\s{6}Host/g,"\n Host").replace(/\t/g,""):cnt //console.log("part-fix:\n"+cnt.split("proxies:")[1]) cnt = cnt.indexOf("proxies:") == -1? "proxies:\n" + cnt :"proxies:"+cnt.split("proxies:")[1] console.log("after-fix\n"+cnt)