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(ecustpt): add ecustpt site config #1711

Merged
merged 1 commit into from
Jan 23, 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
375 changes: 375 additions & 0 deletions resource/sites/ecustpt.eu.org/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,375 @@
{
"name": "ECUSTPT",
"description": "华东理工大学PT站,逢考必过",
"timezoneOffset": "+0800",
"schema": "NexusPHP",
"host": "ecustpt.eu.org",
"url": "https://public.ecustpt.eu.org/",
"icon": "https://public.ecustpt.eu.org/favicon.ico",
"tags": [
"教育网",
"影视",
"综合"
],
"collaborator": [
"EasonWong"
],
"levelRequirements": [
{
"level": "1",
"name": "Power User",
"interval": "4",
"downloaded": "5GB",
"ratio": "1.05",
"seedingPoints": "4000",
"privilege": "得到一个邀请名额;可以直接发布种子;可以查看NFO文档;可以查看用户列表;可以请求续种; 可以发送邀请; 可以查看排行榜;可以查看其它用户的种子历史(如果用户隐私等级未设置为\"强\"); 可以删除自己上传的字幕。"
},
{
"level": "2",
"name": "Elite User",
"interval": "8",
"downloaded": "12GB",
"ratio": "1.55",
"seedingPoints": "16000",
"privilege": "Elite User及以上用户封存账号后不会被删除。"
},
{
"level": "3",
"name": "Crazy User",
"interval": "15",
"downloaded": "30GB",
"ratio": "2.05",
"seedingPoints": "3000",
"privilege": "得到两个邀请名额;可以在做种/下载/发布的时候选择匿名模式。"
},
{
"level": "4",
"name": "Insane User",
"interval": "25",
"downloaded": "100GB",
"ratio": "2.55",
"seedingPoints": "50000",
"privilege": "可以查看普通日志。"
},
{
"level": "5",
"name": "Veteran User",
"interval": "40",
"downloaded": "512GB",
"ratio": "3.05",
"seedingPoints": "80000",
"privilege": "得到三个邀请名额;可以查看其它用户的评论、帖子历史。Veteran User及以上用户会永远保留账号。"
},
{
"level": "6",
"name": "Extreme User",
"interval": "60",
"downloaded": "1TB",
"ratio": "3.55",
"seedingPoints": "200000",
"privilege": "可以更新过期的外部信息;可以查看Extreme User论坛。"
},
{
"level": "7",
"name": "Ultimate User",
"interval": "80",
"downloaded": "1.5TB",
"ratio": "4.05",
"seedingPoints": "600000",
"privilege": "得到五个邀请名额。"
},
{
"level": "8",
"name": "Nexus Master",
"interval": "100",
"downloaded": "3TB",
"ratio": "4.55",
"seedingPoints": "1000000",
"privilege": "得到十个邀请名额。"
}
],
"securityKeyFields": [
"passkey"
],
"searchEntryConfig": {
"merge": true,
"fieldSelector": {
"progress": {
"selector": [
"td.snatched_no_yes, td.snatched_yes_yes",
"td.snatched_no_no, td.snatched_yes_no",
""
],
"switchFilters": [
[
"100"
],
[
"0"
],
[
"null"
]
]
},
"status": {
"selector": [
"td.snatched_no_yes, td.snatched_yes_yes",
"td.snatched_no_no, td.snatched_yes_no"
],
"switchFilters": [
[
"2"
],
[
"3"
]
]
}
}
},
"searchEntry": [
{
"name": "全部",
"enabled": true
}
],
"categories": [
{
"entry": "torrents.php",
"result": "tag_id=$id$",
"category": [
{
"id": 4,
"name": "学习资料"
}
]
},
{
"entry": "torrents.php",
"result": "cat$id$=1",
"category": [
{
"id": 401,
"name": "电影"
},
{
"id": 402,
"name": "电视剧"
},
{
"id": 403,
"name": "综艺"
},
{
"id": 404,
"name": "纪录片"
},
{
"id": 405,
"name": "动漫"
},
{
"id": 406,
"name": "MV"
},
{
"id": 407,
"name": "体育"
},
{
"id": 408,
"name": "音轨"
},
{
"id": 409,
"name": "其他"
},
{
"id": 410,
"name": "学习"
},
{
"id": 411,
"name": "游戏"
},
{
"id": 416,
"name": "软件"
},
{
"id": 417,
"name": "MAC"
},
{
"id": 419,
"name": "校园"
}
]
}
],
"checker": {
"isLogin": {
"page": "/usercp.php",
"contains": "logout.php"
}
},
"selectors": {
"userBaseInfo": {
"page": "/index.php",
"fields": {
"id": {
"selector": [
"a[href*='userdetails.php'][class*='Name']:first",
"a[href*='userdetails.php']:first"
],
"attribute": "href",
"filters": [
"query ? query.getQueryString('id'):''"
]
},
"name": {
"selector": [
"a[href*='userdetails.php'][class*='Name']:first",
"a[href*='userdetails.php']:first"
],
"filters": [
"query && query.attr('href').getQueryString('id') > 0 ? query.text(): ''"
]
},
"isLogged": {
"selector": [
"a[href*='usercp.php']"
],
"filters": [
"query.length>0"
]
},
"messageCount": {
"selector": [
"td[style*='background: red'] a[href*='messages.php']"
],
"filters": [
"query.text().match(/(\\d+)/)",
"(query && query.length>=2)?parseInt(query[1]):0"
]
}
}
},
"userExtendInfo": {
"page": "/userdetails.php?id=$user.id$",
"fields": {
"uploaded": {
"selector": [
"td.rowhead:contains('传输') + td",
"td.rowhead:contains('傳送') + td",
"td.rowhead:contains('Transfers') + 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.rowhead:contains('傳送') + td",
"td.rowhead:contains('Transfers') + 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('等级')",
"td.rowhead:contains('等級')",
"td.rowhead:contains('Class')"
],
"filters": [
"query.next().find('img').attr('title')"
]
},
"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": [
"div:contains('你当前每小时能获取'):last",
"div:contains('You are currently getting'):last",
"div:contains('你當前每小時能獲取'):last"
],
"filters": [
"parseFloat(query.text().match(/[\\d.]+/)[0])"
]
}
}
},
"userSeedingTorrents": {
"page": "/getusertorrentlistajax.php?userid=$user.id$&type=seeding",
"fields": {
"seeding": {
"selector": [
"b:first"
],
"filters": [
"query.text()"
]
},
"seedingSize": {
"selector": "",
"filters": [
"query.text().match(/总大小:(.*?)上一页/g)",
"(query && query.length>0) ? query[0].replace('总大小:', '').replace('<< 上一页', '').trim() : 0",
"(query != 0) ? query.sizeToNumber() : 0"
]
}
}
}
}
}