|
@@ -89,20 +89,20 @@ function cutString (original, before, after, index) {
|
|
|
if (P > -1) {
|
|
if (P > -1) {
|
|
|
if (after) {
|
|
if (after) {
|
|
|
const f = original.indexOf(after, P + before.length);
|
|
const f = original.indexOf(after, P + before.length);
|
|
|
- return (f>-1)? original.slice(P + before.toString().length, f):console.error("Tool [在文本中找不到 参数三 "+after+"]");
|
|
|
|
|
|
|
+ return (f>-1)? original.slice(P + before.toString().length, f):"";
|
|
|
} else {
|
|
} else {
|
|
|
return original.slice(P + before.toString().length);
|
|
return original.slice(P + before.toString().length);
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
console.error("Tool [在文本中找不到 参数一 " + before + "]");
|
|
console.error("Tool [在文本中找不到 参数一 " + before + "]");
|
|
|
- return
|
|
|
|
|
|
|
+ return ''
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
console.error("Tool [sizeTransition:" + index + "不是一个整数!]");
|
|
console.error("Tool [sizeTransition:" + index + "不是一个整数!]");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-function checkText () {
|
|
|
|
|
|
|
+function checkText (adtaArr, index) {
|
|
|
if (window.noRun) return
|
|
if (window.noRun) return
|
|
|
if (document.querySelector('.style-scope.ytd-about-channel-renderer') || document.querySelector('ytm-about-channel-renderer').innerText) {
|
|
if (document.querySelector('.style-scope.ytd-about-channel-renderer') || document.querySelector('ytm-about-channel-renderer').innerText) {
|
|
|
window.noRun = true
|
|
window.noRun = true
|
|
@@ -110,15 +110,20 @@ function checkText () {
|
|
|
if (!pdInfo) {
|
|
if (!pdInfo) {
|
|
|
pdInfo = document.querySelector('ytm-about-channel-renderer').innerText
|
|
pdInfo = document.querySelector('ytm-about-channel-renderer').innerText
|
|
|
}
|
|
}
|
|
|
- let bfsl = parseInt(cutString(pdInfo,'视频\n\n\t', '次观看'))
|
|
|
|
|
- let spsl = parseInt(cutString(pdInfo,'订阅者\n\n\t', '个视频'))
|
|
|
|
|
- let dyrs = parseInt(cutString(pdInfo,'注册\n\n\t', '位订阅者'))
|
|
|
|
|
|
|
+ let bfsl = parseInt(cutString(pdInfo,'视频\n\n\t', '次观看').replaceAll(',', ''))
|
|
|
|
|
+ let spsl = parseInt(cutString(pdInfo,'订阅者\n\n\t', '个视频').replaceAll(',', ''))
|
|
|
|
|
+ let dyrs = parseInt(cutString(pdInfo,'注册\n\n\t', '位订阅者').replaceAll(',', ''))
|
|
|
if (!spsl) {
|
|
if (!spsl) {
|
|
|
- spsl = parseInt(cutString(pdInfo,'注册\n', '个视频'))
|
|
|
|
|
|
|
+ spsl = parseInt(cutString(pdInfo,'注册\n', '个视频').replaceAll(',', ''))
|
|
|
}
|
|
}
|
|
|
bfsl = bfsl ? bfsl : 0
|
|
bfsl = bfsl ? bfsl : 0
|
|
|
spsl = spsl ? spsl : 0
|
|
spsl = spsl ? spsl : 0
|
|
|
dyrs = dyrs ? dyrs : 0
|
|
dyrs = dyrs ? dyrs : 0
|
|
|
|
|
+ if (document.title.includes('404')) {
|
|
|
|
|
+ bfsl = -1
|
|
|
|
|
+ spsl = -1
|
|
|
|
|
+ dyrs = -1
|
|
|
|
|
+ }
|
|
|
console.log(bfsl, spsl, dyrs)
|
|
console.log(bfsl, spsl, dyrs)
|
|
|
adtaArr[index][5] = bfsl
|
|
adtaArr[index][5] = bfsl
|
|
|
adtaArr[index][6] = spsl
|
|
adtaArr[index][6] = spsl
|
|
@@ -140,10 +145,10 @@ function checkData (adtaArr) {
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
document.querySelector('.yt-truncated-text__absolute-button').click()
|
|
document.querySelector('.yt-truncated-text__absolute-button').click()
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
- checkText()
|
|
|
|
|
|
|
+ checkText(adtaArr, index)
|
|
|
}, 3000);
|
|
}, 3000);
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
- checkText()
|
|
|
|
|
|
|
+ checkText(adtaArr, index)
|
|
|
}, 8000);
|
|
}, 8000);
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
location.reload()
|
|
location.reload()
|