Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 站点【新柠檬】时魔、做种数量、做种体积的获取 #2076

Merged
merged 1 commit into from
Dec 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 36 additions & 1 deletion resource/sites/lemonhd.club/config.json
Original file line number Diff line number Diff line change
@@ -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)"
]
}
}
}
}
}
Loading