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

fix(zmpt): 织梦魔力值修改为 "电力值",修复上传进度; #1690

Merged
merged 2 commits into from
Dec 16, 2023
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
92 changes: 67 additions & 25 deletions resource/sites/zmpt.cc/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "为爱启航,造就梦想!",
"url": "https://zmpt.cc/",
"icon": "https://zmpt.cc/favicon.ico",
"tags": [],
"tags": ["影视","综合","游戏"],
"schema": "NexusPHP",
"host": "zmpt.cc",
"levelRequirements": [
Expand All @@ -15,71 +15,71 @@
"downloaded": "50GB",
"ratio": "1.05",
"seedingPoints": "30000",
"privilege": "得到一个邀请名额;可以直接发布种子;可以查看NFO文档;可以查看用户列表;可以请求续种; 可以发送邀请; 可以查看排行榜;可以查看其它用户的种子历史(如果用户隐私等级未设置为\"强\"); 可以删除自己上传的字幕。"
"privilege": "可以直接发布种子;可以查看NFO文档;可以查看用户列表;可以请求续种; 可以发送邀请; 可以查看排行榜;可以查看其它用户的种子历史(如果用户隐私等级未设置为\"强\"); 可以删除自己上传的字幕。"
},
{
"level": 2,
"name": "Elite User",
"interval": "7",
"interval": "8",
"downloaded": "120GB",
"ratio": "1.55",
"seedingPoints": "50000",
"privilege": "Elite User及以上用户封存账号后不会被删除。"
"seedingPoints": "80000",
"privilege": ""
},
{
"level": 3,
"name": "Crazy User",
"interval": "10",
"interval": "16",
"downloaded": "300GB",
"ratio": "2.05",
"seedingPoints": "100000",
"privilege": "得到两个邀请名额;可以在做种/下载/发布的时候选择匿名模式。"
"seedingPoints": "150000",
"privilege": "可以发送邀请;可以在做种/下载/发布的时候选择匿名模式。"
},
{
"level": 4,
"name": "Insane User",
"interval": "16",
"interval": "28",
"downloaded": "500GB",
"ratio": "2.55",
"seedingPoints": "200000",
"privilege": "可以查看普通日志。"
"seedingPoints": "250000",
"privilege": "可以查看普通日志。Insane User及以上用户封存账号后不会被删除; 得到一个邀请名额。"
},
{
"level": 5,
"name": "Veteran User",
"interval": "20",
"interval": "40",
"downloaded": "750GB",
"ratio": "3.05",
"seedingPoints": "300000",
"privilege": "得到三个邀请名额;可以查看其它用户的评论、帖子历史。Veteran User及以上用户会永远保留账号。"
"seedingPoints": "400000",
"privilege": "得到两个邀请名额;可以查看其它用户的评论、帖子历史。"
},
{
"level": 6,
"name": "Extreme User",
"interval": "30",
"interval": "56",
"downloaded": "1TB",
"ratio": "3.55",
"seedingPoints": "400000",
"privilege": "可以更新过期的外部信息;可以查看Extreme User论坛。"
"seedingPoints": "600000",
"privilege": "得到两个邀请名额;可以更新过期的外部信息;可以查看Extreme User论坛。"

},
{
"level": 7,
"name": "Ultimate User",
"interval": "30",
"interval": "76",
"downloaded": "1.5TB",
"ratio": "4.05",
"seedingPoints": "500000",
"privilege": "得到五个邀请名额。"
"seedingPoints": "900000",
"privilege": "得到两个邀请名额。"
},
{
"level": 8,
"name": "Nexus Master",
"interval": "30",
"interval": "100",
"downloaded": "3TB",
"ratio": "4.55",
"seedingPoints": "600000",
"privilege": "得到十个邀请名额。"
"seedingPoints": "1500000",
"privilege": "得到十个邀请名额。Nexus Master及以上用户会永远保留账号。"
}
],
"collaborator": "yeluoqiuming",
Expand All @@ -88,15 +88,15 @@
"fieldSelector": {
"progress": {
"selector": [
"> td.rowfollow:eq(1) td.embedded:eq(1) > div:last"
".torrentname td.embedded:first-child > div:last"
],
"filters": [
"query ? parseFloat(query.attr('title').match(/[\\d.]+/)) : null"
]
},
"status": {
"selector": [
"> td.rowfollow:eq(1) td.embedded:eq(1) > div:last"
".torrentname td.embedded:first-child > div:last"
],
"filters": [
"query ? query.attr('title') : ''",
Expand Down Expand Up @@ -126,6 +126,48 @@
]
}
}
},
"userExtendInfo": {
"page": "/userdetails.php?id=$user.id$",
"fields": {
"uploaded": {
"selector": ["td.rowhead:contains('传输') + td", "td.rowfollow:contains('分享率')"],
"filters": ["query.text().replace(/,/g,'').match(/(上[传傳]量|Uploaded).+?([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length==3)?(query[2]).sizeToNumber():0"]
},
"downloaded": {
"selector": ["td.rowhead:contains('传输') + td", "td.rowfollow:contains('分享率')"],
"filters": ["query.text().replace(/,/g,'').match(/(下[载載]量|Downloaded).+?([\\d.]+ ?[ZEPTGMK]?i?B)/)", "(query && query.length==3)?(query[2]).sizeToNumber():0"]
},
"levelName": {
"selector": ["td.rowhead:contains('等级')"],
"filters": ["query.next().find('img').attr('title')", "query.replace(/[^a-z0-9 ]/gi, '').trim().length > 0 ? query.replace(/[^a-z0-9 ]/gi, '').trim() : query"]
},
"bonus": {
"selector": ["td.rowhead:contains('电力') + td", "td.rowhead:contains('Karma'):contains('Points') + td", "td.rowhead:contains('麦粒') + td", "td.rowfollow:contains('电力值')", "td.rowhead:contains('bonus') + td"],
"filters": ["query.is(\":contains('电力值:')\")||query.is(\":contains('Bonus Points:')\")?query.text().replace(/,/g,'').match(/(?:电力值|Bonus Points).+?([\\d.]+)/)[1]:query.text().replace(/,/g,'')", "parseFloat(query)"]
},
"seedingPoints": {
"selector": ["td.rowhead:contains('做种积分') + td", "td.rowhead:contains('Seeding Points') + td", "td.rowhead:contains('做種積分') + td", "td.rowhead:contains('保种积分') + td", "td.rowfollow:contains('做种积分')", "td.rowfollow:contains('Seeding Points')", "td.rowfollow:contains('做種積分')"],
"filters": [
"query.text().replace(/,/g,'')",
"query.includes('做种积分') || query.includes('做種積分') || query.includes('Seeding Points') ? query.match(/(做种积分|做種積分|Seeding Points).+?[\\d.]+/g)[0] : query",
"query ? parseFloat(query.match(/[\\d.]+/)[0]) : null"]
},
"joinTime": {
"selector": ["td.rowhead:contains('加入日期')", "td.rowhead:contains('Join'):contains('date')"],
"filters": ["query.next().text().split(' (')[0].trim()", "dateTime(query).isValid()?dateTime(query).valueOf():query"]
}
}
},
"bonusExtendInfo": {
"prerequisites": "!user.bonusPerHour",
"page": "/mybonus.php",
"fields": {
"bonusPerHour": {
"selector": ["#outer td[rowspan]"],
"filters": ["parseFloat(query.text().replace(/,/g,'').match(/[\\d.]+/)[0])"]
}
}
}
}
}