From f3fa03cbed09b8dda5b59eb931574fc9478bbbe4 Mon Sep 17 00:00:00 2001 From: meijie Date: Fri, 13 Dec 2024 20:59:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=AB=99=E7=82=B9=E3=80=90?= =?UTF-8?q?=E6=96=B0=E6=9F=A0=E6=AA=AC=E3=80=91=E6=97=B6=E9=AD=94=E3=80=81?= =?UTF-8?q?=E5=81=9A=E7=A7=8D=E6=95=B0=E9=87=8F=E3=80=81=E5=81=9A=E7=A7=8D?= =?UTF-8?q?=E4=BD=93=E7=A7=AF=E7=9A=84=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resource/sites/lemonhd.club/config.json | 37 ++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/resource/sites/lemonhd.club/config.json b/resource/sites/lemonhd.club/config.json index caf31cfd5..0ba1c63f1 100644 --- a/resource/sites/lemonhd.club/config.json +++ b/resource/sites/lemonhd.club/config.json @@ -8,7 +8,8 @@ "icon": "https://lemonhd.club/favicon.ico", "tags": ["综合"], "collaborator": "haowenwu", - "levelRequirements": [{ + "levelRequirements": [ + { "level": "1", "name": "Power User", "interval": "5", @@ -89,5 +90,39 @@ ] } } + }, + "selectors": { + "userSeedingTorrents": { + "page": "/userdetails.php?id=$user.id$", + "fields": { + "seeding": { + "selector": "font.color_active:contains('当前活动:')", + "filters": [ + "query.parent().text().match(/当前活动:\\s*(\\d+)/)[1]", + "parseInt(query)" + ] + }, + "seedingSize": { + "selector": "td.rowfollow", + "filters": [ + "query.text().match(/总体积:\\s*([\\d.]+\\s*[A-Z]+)\\s+/)[1]", + "(query) ? query.trim() : 0", + "(query != 0) ? query.sizeToNumber() : 0" + ] + } + } + }, + "bonusExtendInfo": { + "prerequisites": "!user.bonusPerHour", + "page": "/mybonus.php", + "fields": { + "bonusPerHour": { + "selector": ["div:contains('你当前每小时能获取')", "div:contains('从邀请者中获得加成')"], + "filters": [ + "query.map(function() { return parseFloat($(this).text().match(/[\\d.]+/)[0]); }).get().reduce(function(sum, value) { return sum + value; }, 0)" + ] + } + } + } } }