diff --git a/par-core/src/main/resources/scripts/default-nexusphp.groovy b/par-core/src/main/resources/scripts/default-nexusphp.groovy index d8ee356..a174972 100644 --- a/par-core/src/main/resources/scripts/default-nexusphp.groovy +++ b/par-core/src/main/resources/scripts/default-nexusphp.groovy @@ -15,9 +15,9 @@ Map parse(String content, String url) { private Map parseUserInfo(doc) { def fields = [:] - def el = utils.selectFirst(doc, '#info_block, td.bottom.clearfix, .userbar') + def el = doc.selectFirst('#info_block, td.bottom.clearfix, .userbar') if (el) { - def t = utils.text(el) + def t = el.text() def um = t =~ /上传[::]\s*([0-9.,]+)\s*(TB|GB|MB|KB|B)?/ def dm = t =~ /下载[::]\s*([0-9.,]+)\s*(TB|GB|MB|KB|B)?/ def rm = t =~ /分享率[::]\s*([\d.,]+)/ @@ -119,9 +119,9 @@ Map sync(PluginContext ctx) { def url = ctx.siteUrl.replaceAll('/+\$', '') + '/index.php' def body = http.get(url, ctx.auth) def doc = Jsoup.parse(body) - def el = utils.selectFirst(doc, '#info_block, td.bottom.clearfix, .userbar') + def el = doc.selectFirst('#info_block, td.bottom.clearfix, .userbar') if (!el) { ctx.incomplete = true; return [message: '未找到用户信息'] } - def t = utils.text(el) + def t = el.text() def result = [:] def um = t =~ /上传[::]\s*([0-9.,]+)\s*(TB|GB|MB|KB|B)?/ def dm = t =~ /下载[::]\s*([0-9.,]+)\s*(TB|GB|MB|KB|B)?/