Skip to content

Commit

Permalink
feat:添加开关选择是否显示升级条件;适配网站升级条件;改进UNIT3D架构的时魔抓取
Browse files Browse the repository at this point in the history
  • Loading branch information
fzlins committed Dec 7, 2022
1 parent c35cedb commit 6336e2f
Show file tree
Hide file tree
Showing 7 changed files with 203 additions and 90 deletions.
5 changes: 4 additions & 1 deletion resource/i18n/en.json
Expand Up @@ -165,6 +165,7 @@
"siteName": "Site name",
"userName": "User name",
"userLevel": "User level",
"levelRequirements": "Level requirements",
"week": "Expressed in weeks",
"timeline": "Time line",
"settings": "Settings",
Expand All @@ -191,7 +192,9 @@
"joinTime": "Join time",
"lastUpdateTime": "Update at",
"status": "Status",
"comments": "Comments"
"comments": "Comments",
"uploads": "Uploaded",
"trueDownloaded": "True Downloaded"
},
"tip": "N/A means no support",
"nodata": "You have not added a site, please go to [Sites] to add a site."
Expand Down
5 changes: 4 additions & 1 deletion resource/i18n/zh-CN.json
Expand Up @@ -162,6 +162,7 @@
"siteName": "网站名称",
"userName": "用户名称",
"userLevel": "用户等级",
"levelRequirements": "等级要求",
"week": "时间显示为周数",
"timeline": "时间轴",
"settings": "参数",
Expand All @@ -187,7 +188,9 @@
"bonusPerHour": "时魔",
"joinTime": "入站时间",
"lastUpdateTime": "数据更新于",
"status": "状态"
"status": "状态",
"uploads": "发布",
"trueDownloaded": "真实下载"
},
"tip": "N/A 表示暂不支持",
"nodata": "您还没有添加站点,请前往『站点设置』添加站点。"
Expand Down
4 changes: 2 additions & 2 deletions resource/schemas/UNIT3D/config.json
Expand Up @@ -86,7 +86,7 @@
"filters": ["query.parent().text().trim().replace(/,|\\s|\\n/g,'').match(/[\\d.]+/)", "(query && query.length>=1)?parseFloat(query[0]):0"]
},
"bonusPage": {
"selector": ["span.badge-user a[href*='bonus']","li.ratio-bar__points a"],
"selector": ["a[href*='bonus']:first"],
"filters": ["new URL(query.attr('href')).pathname"]
}
}
Expand Down Expand Up @@ -117,7 +117,7 @@
"fields": {
"bonusPerHour": {
"selector": [".table-condensed tr:last td:eq(2)"],
"filters": ["parseFloat(query.text().trim())"]
"filters": ["parseFloat(query.text().match(/[\\d.]+/)[0])"]
}
}
},
Expand Down
101 changes: 51 additions & 50 deletions resource/sites/greatposterwall.com/config.json
Expand Up @@ -12,67 +12,58 @@
"levelRequirements": [{
"level": "1",
"name": "Member",
"interval": "5",
"downloaded": "80GB",
"ratio": "1.0",
"bonus": "3200",
"privilege": "请求续种;查看排行榜;查看其它用户的种子历史"
"interval": "1",
"trueDownloaded": "80GB",
"ratio": "0.8",
"privilege": "发起求种;查看部分排行榜;完全访问「茶话会」版块"
},{
"level": "2",
"name": "Elite User",
"interval": "10",
"downloaded": "150GB",
"ratio": "1.5",
"bonus": "19200",
"privilege": "查看邀请区"
"name": "Power User",
"interval": "2",
"uploads": "1",
"trueDownloaded": "200GB",
"ratio": "1.2",
"privilege": "免疫账号不活跃;发送邀请;赠送1枚邀请;访问论坛的「求邀区」「发邀区」「Power User」"
},{
"level": "3",
"name": "Crazy User",
"interval": "15",
"downloaded": "300GB",
"ratio": "2.0",
"bonus": "76800",
"privilege": "在做种/下载的时候选择匿名模式"
"name": "Elite",
"interval": "4",
"uploads": "25",
"trueDownloaded": "500GB",
"ratio": "1.2",
"privilege": "赠送1枚邀请;访问论坛的「Elite」;检查自己发布的种子;编辑所有种子"
},{
"level": "4",
"name": "Insane User",
"interval": "30",
"downloaded": "500GB",
"ratio": "2.5",
"bonus": "256000",
"privilege": "查看普通日志"
"name": "Torrent Master",
"interval": "8",
"uploads": "100",
"trueDownloaded": "1TB",
"ratio": "1.2",
"privilege": "赠送2枚邀请;每月获赠1枚临时邀请;访问论坛的「Torrent Master」"
},{
"level": "5",
"name": "Veteran User",
"interval": "60",
"downloaded": "1TB",
"ratio": "3.5",
"bonus": "640000",
"privilege": "永远保留账号"
"name": "Power Torrent Master",
"interval": "12",
"uploads": "250",
"trueDownloaded": "2TB",
"ratio": "1.2",
"privilege": "赠送2枚邀请;每月获赠2枚临时邀请;检查所有种子"
},{
"level": "6",
"name": "Extreme User",
"interval": "90",
"downloaded": "2TB",
"ratio": "4.0",
"bonus": "1280000",
"privilege": "超速后不会受到额外惩罚"
"name": "Elite Torrent Master",
"interval": "16",
"uploads": "500",
"trueDownloaded": "5TB",
"ratio": "1.2",
"privilege": "赠送3枚邀请;每月获赠3枚临时邀请;访问论坛的「Elite Torrent Master」"
},{
"level": "7",
"name": "Ultimate User",
"interval": "120",
"downloaded": "3TB",
"ratio": "4.5",
"bonus": "1920000",
"privilege": "上传速度限制提升为普通用户的二倍"
},{
"level": "8",
"name": "Nexus Master",
"interval": "150",
"downloaded": "4TB",
"ratio": "5.0",
"bonus": "2560000",
"privilege": "除了数据考核要求,其他权利等同于VIP,包括没有上传速度的限制"
"name": "Guru",
"interval": "20",
"uploads": "1000",
"trueDownloaded": "10TB",
"ratio": "1.2",
"privilege": "无限邀请;访问论坛的「Guru」;查看种子检查日志"
}],
"collaborator": [
"MewX"
Expand Down Expand Up @@ -109,7 +100,17 @@
}
},
"userExtendInfo": {
"disabled": true
"page": "/user.php?id=$user.id$",
"fields": {
"uploads": {
"selector": ["#upload-count-value"],
"filters" : ["query.text().replace(/,/g,'').match(/[\\d.]+/)[0]"]
},
"trueDownloaded": {
"selector": ["#downloaded-value"],
"filters" : ["query.text().replace(/,/g,'').match(/[\\d.]+ ?[ZEPTGMK]?i?B/g)", "query ? query[1].sizeToNumber(): 0"]
}
}
},
"userSeedingTorrents": {
"page": "/bonus.php?action=bprates",
Expand Down
65 changes: 65 additions & 0 deletions resource/sites/pt.btschool.club/config.json
Expand Up @@ -10,6 +10,71 @@
"formerHosts": [
"pt.btschool.net"
],
"levelRequirements": [{
"level": "1",
"name": "Power User",
"interval": "4",
"downloaded": "50GB",
"ratio": "2.0",
"seedingPoints": "40000",
"privilege": "一个邀请名额;查看NFO文档;查看用户列表;请求续种;查看其它用户的种子历史; 删除自己上传的字幕。"
},{
"level": "2",
"name": "Elite User",
"interval": "8",
"downloaded": "100GB",
"ratio": "2.5",
"seedingPoints": "80000",
"privilege": "直接发布种子; 查看排行榜"
},{
"level": "3",
"name": "Crazy User",
"interval": "15",
"downloaded": "300GB",
"ratio": "3.0",
"seedingPoints": "150000",
"privilege": "两个邀请名额;在做种/下载/发布的时候选择匿名模式"
},{
"level": "4",
"name": "Insane User",
"interval": "25",
"downloaded": "500GB",
"ratio": "3.5",
"seedingPoints": "250000",
"privilege": "查看普通日志"
},{
"level": "5",
"name": "Veteran User",
"interval": "40",
"downloaded": "1TB",
"ratio": "4.0",
"seedingPoints": "400000",
"privilege": "三个邀请名额;查看其它用户的评论、帖子历史;封存账号后不会被删除"
},{
"level": "6",
"name": "Extreme User",
"interval": "60",
"downloaded": "2TB",
"ratio": "4.5",
"seedingPoints": "600000",
"privilege": "更新过期的外部信息;查看Extreme User论坛;永远保留账号"
},{
"level": "7",
"name": "Ultimate User",
"interval": "80",
"downloaded": "5TB",
"ratio": "5.0",
"seedingPoints": "800000",
"privilege": "五个邀请名额"
},{
"level": "8",
"name": "Nexus Master",
"interval": "100",
"downloaded": "10TB",
"ratio": "5.5",
"seedingPoints": "1000000",
"privilege": "十个邀请名额;发送邀请"
}],
"searchEntryConfig": {
"area": [
{
Expand Down
10 changes: 8 additions & 2 deletions src/interface/common.ts
Expand Up @@ -279,15 +279,17 @@ export interface LevelRequirement {
// 日期要求
requiredDate?: string;
// 上传数要求
upload?: number;
uploads?: number;
// 上传量要求
uploaded?: string | number;
// 下载量要求
downloaded?: string | number;
// 真实下载量
trueDownloaded?: string | number;
// 积分要求
bonus?: number;
// 做种积分要求
seedingPoints?:number;
seedingPoints?: number;
// 保种体积要求
seedingSize?: number;
// 分享率要求
Expand Down Expand Up @@ -542,8 +544,12 @@ export interface UserInfo {
name: string;
// 上传量
uploaded?: number;
// 发布数
uploads?: number;
// 下载量
downloaded?: number;
// 真实下载量
trueDownloaded?: string | number;
// 分享率
ratio?: number;
// 当前做种数量
Expand Down

0 comments on commit 6336e2f

Please sign in to comment.