Skip to content

Commit

Permalink
新增站点【新柠檬】时魔、做种数量、做种体积的获取
Browse files Browse the repository at this point in the history
  • Loading branch information
Jay-M2022 authored and ted423 committed Dec 14, 2024
1 parent bf7c4f5 commit f3fa03c
Showing 1 changed file with 36 additions and 1 deletion.
37 changes: 36 additions & 1 deletion resource/sites/lemonhd.club/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"icon": "https://lemonhd.club/favicon.ico",
"tags": ["综合"],
"collaborator": "haowenwu",
"levelRequirements": [{
"levelRequirements": [
{
"level": "1",
"name": "Power User",
"interval": "5",
Expand Down Expand Up @@ -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)"
]
}
}
}
}
}

0 comments on commit f3fa03c

Please sign in to comment.