源仓库
https://www.yckgo.top
分享者: yuluoxc (7471)发布时间: 02/14 00:40
源仓库订阅源(2026.2.14):
1.修复:在线获取可用域名,每5分钟检测一次
2.添加:书源,订阅源搜索兼容两种方式
{
"articleStyle": 1,
"cacheFirst": false,
"customOrder": -10106414,
"enableJs": true,
"enabled": true,
"enabledCookieJar": true,
"jsLib": "\/\/ 本地备用地址\nconst fallbackHosts = [\n \"https:\/\/www.yck.email\",\n \"https:\/\/www.yck2026.top\",\n \"https:\/\/www.yckceo.com\"\n];\n\nconst KEY_WORKING_HOST = \"working_host\";\nconst KEY_HOST_EXPIRE = \"host_expire\";\nconst CACHE_TIME = 300000; \/\/ 5分钟缓存\n\nfunction bhost() {\n const { java, cache } = this;\n const now = Date.now();\n\n \/\/ 1. 优先直接用缓存(不检测、不提示)\n const cachedHost = cache.getFromMemory(KEY_WORKING_HOST);\n const expireTime = cache.getFromMemory(KEY_HOST_EXPIRE) || 0;\n\n if (cachedHost != null && now < expireTime) {\n \/\/ 直接返回,不检测、不弹窗\n return cachedHost;\n }\n\n \/\/ ======================================================\n \/\/ 下面这段 【只有缓存过期\/没有缓存时 才会执行】\n \/\/ 平时访问根本不会走到这里!\n \/\/ ======================================================\n java.toast(\"正在更新最优线路...\");\n\n const goodList = checkLatency(fallbackHosts, this);\n let bestHost;\n\n if (goodList.length > 0) {\n bestHost = goodList[0].host;\n } else {\n bestHost = fallbackHosts[0];\n }\n\n \/\/ 缓存起来 5 分钟\n cache.putMemory(KEY_WORKING_HOST, bestHost);\n cache.putMemory(KEY_HOST_EXPIRE, now + CACHE_TIME);\n\n java.toast(\"线路已保存,5分钟内不再检测\");\n return bestHost;\n}\n\n\/\/ 检测连通性\nfunction isHostAvailable(host, java) {\n try {\n org.jsoup.Jsoup.connect(host)\n .method(org.jsoup.Connection.Method.HEAD)\n .timeout(2000)\n .ignoreHttpErrors(true)\n .execute();\n return true;\n } catch (e) {\n return false;\n }\n}\n\n\/\/ 批量测速\nfunction checkLatency(urls, ctx) {\n const { java } = ctx;\n const list = [];\n for (var i = 0; i < urls.length; i++) {\n let url = urls[i].startsWith(\"http\") ? urls[i] : \"https:\/\/\" + urls[i];\n try {\n var t1 = Date.now();\n org.jsoup.Jsoup.connect(url)\n .method(org.jsoup.Connection.Method.HEAD)\n .timeout(2000)\n .ignoreHttpErrors(true)\n .execute();\n var t2 = Date.now();\n list.push({ host: url, latency: t2 - t1 });\n } catch (e) {}\n }\n list.sort(function (a, b) {\n return a.latency - b.latency;\n });\n return list;\n}\n",
"lastUpdateTime": 1771000555911,
"loadWithBaseUrl": true,
"preload": false,
"ruleArticles": ".layui-card-body@.ylist",
"ruleDescription": "<title>{{@h2@a@text}}<\/title>\n<iframe src=\"legado:\/\/import\/auto?src={{bhost()}}\/yuedu\/{{@a@href##.*\/yuedu\/(.*)\/content\/id\/.*.html##$1}}\/json\/id\/{{@a@href##.*\/yuedu\/.*\/content\/id\/(.*).html##$1}}.json\" hidden><\/iframe>\n<br><h3>{{@h2@a@text}}<\/h3>\n<h5>{{@span.-1@text}}<\/h5>\n<h6><b>\n↓资源链接,点击复制\n<a href=\"legado:\/\/import\/auto?src={{bhost()}}\/yuedu\/{{@a@href##.*\/yuedu\/(.*)\/content\/id\/.*.html##$1}}\/json\/id\/{{@a@href##.*\/yuedu\/.*\/content\/id\/(.*).html##$1}}.json\">一键导入<\/a>\n<textarea id=\"copy\" onclick=\"copy()\">{{bhost()}}\/yuedu\/{{@a@href##.*\/yuedu\/(.*)\/content\/id\/.*.html##$1}}\/json\/id\/{{@a@href##.*\/yuedu\/.*\/content\/id\/(.*).html##$1}}.json<\/textarea>\n{{@span.-2@text}} {{@p@text}}<\/b><\/h6><script>\nfunction copy(){\n\tdocument.getElementById('copy').select()\n\tdocument.execCommand('copy')\n\talert(\"链接复制成功👉请粘贴到对应导入地方导入\")\n}\n<\/script>",
"ruleLink": "a@href",
"ruleNextPage": "page",
"rulePubDate": "{{@span.-2@text}} {{@.m-right@text}} {{@span.-1@text}}",
"ruleTitle": "h2@a@text",
"searchUrl": "@js:\nresult=bhost()+\"\/yuedu\/shuyuan\/index.html?keys=\"+key+\"&uid=&order1=time&order2=1&ver=&faxian=&sousuo=&tu=&shengyin=&page=\"+page\nresult",
"showWebLog": false,
"singleUrl": false,
"sortUrl": "书源📖::{{bhost()}}\/yuedu\/shuyuan\/index.html?page={{page}}\n书源搜索::{{bhost()}}\/yuedu\/shuyuan\/index.html?keys={{source.getVariable()}}&uid=&order1=time&order2=1&ver=&faxian=&sousuo=&tu=&shengyin=&page={{page}}\n书源合集📖📖::{{bhost()}}\/yuedu\/shuyuans\/index.html?page={{page}}\n订阅源🔔::{{bhost()}}\/yuedu\/rss\/index.html?page={{page}}\n订阅源搜索::{{bhost()}}\/yuedu\/rss\/index.html?keys={{source.getVariable()}}&uid=&order1=time&order2=1&page={{page}}\n订阅源合集🔔🔔::{{bhost()}}\/yuedu\/rsss\/index.html?page={{page}}",
"sourceIcon": "https:\/\/gitee.com\/lyc486\/yuedu\/raw\/master\/ycktb.gif",
"sourceName": "源仓库",
"sourceUrl": "https:\/\/www.yckgo.top",
"style": "a{float:right;text-decoration:none}\nh3,h5{text-align:center}\nh6{margin:0 2;position:sticky;top:30%}\ntextarea{width:100%;border-radius:5px}",
"type": 0
}