feat: nexusphp 脚本增加做种积分识别(seedingScore/seedScore)
This commit is contained in:
@@ -69,6 +69,7 @@ private Map parseUserInfo(doc) {
|
||||
def dm = t =~ /下载[^::]*[::]\s*([0-9.,]+)\s*(TB|GB|MB|KB|B)?/
|
||||
def rm = t =~ /分享率[::]\s*([\d.,]+)/
|
||||
def bm = t =~ /魔力[^::]*[::]\s*([\d.,]+)/
|
||||
def ss = t =~ /做种积分\s*([\d.,]+)/
|
||||
// 做种/下载数:识别 "当前活动" 后的两个数字(NexusPHP 用 img 图标,不是文字)
|
||||
def am = t =~ /当前活动[^::]*[::]\s*(\d+)\s+(\d+)/
|
||||
def im = t =~ /邀请[^::]*[::]\s*(\d+)/
|
||||
@@ -76,6 +77,7 @@ private Map parseUserInfo(doc) {
|
||||
if (dm) fields.download = dm[0][1] + (dm[0][2] ?: '')
|
||||
if (rm) fields.ratio = rm[0][1]
|
||||
if (bm) fields.bonus = bm[0][1]
|
||||
if (ss) fields.seedScore = ss[0][1]
|
||||
if (am) { fields.seeding = am[0][1]; fields.leeching = am[0][2] }
|
||||
if (im) fields.invites = im[0][1]
|
||||
// H&R 红色数字(未达标)
|
||||
@@ -174,12 +176,14 @@ Map sync(PluginContext ctx) {
|
||||
def dm = t =~ /下载[^::]*[::]\s*([0-9.,]+)\s*(TB|GB|MB|KB|B)?/
|
||||
def rm = t =~ /分享率[::]\s*([\d.,]+)/
|
||||
def bm = t =~ /魔力[^::]*[::]\s*([\d.,]+)/
|
||||
def ss = t =~ /做种积分\s*([\d.,]+)/
|
||||
def am = t =~ /当前活动[^::]*[::]\s*(\d+)\s+(\d+)/
|
||||
def im = t =~ /邀请[^::]*[::]\s*(\d+)/
|
||||
if (um) result.upload = utils.parseTraffic(um[0][1] + (um[0][2] ?: ''))
|
||||
if (dm) result.download = utils.parseTraffic(dm[0][1] + (dm[0][2] ?: ''))
|
||||
if (rm) result.shareRatio = rm[0][1].replace(',','') as double
|
||||
if (bm) result.bonus = bm[0][1].replace(',','') as double
|
||||
if (ss) result.seedingScore = ss[0][1].replace(',','') as double
|
||||
if (am) { result.seeding = am[0][1] as int; result.leeching = am[0][2] as int }
|
||||
if (im) result.invites = im[0][1] as int
|
||||
def hrEl = doc.selectFirst('#info_block font[class=fcr], #info_block font[color=red], #info_block .red')
|
||||
|
||||
Reference in New Issue
Block a user