Created
August 18, 2017 10:31
-
-
Save maicong/97615ffabb7d6b4ccd4e33f7d7896374 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;(async (...without) => { | |
let list = [] | |
for (const n of Array.from({ length: 10 }, (v, i) => 1 + i)) { | |
await window | |
.fetch(`http://haoma.qq.com/json/act${n}.json.js`) | |
.then(r => r.text()) | |
.then(r => JSON.parse(r.slice(16, -1))) | |
.then(r => r[2].map(v => list.push(v.num))) | |
} | |
list = [...new Set(list.sort())] | |
without = [...new Set(without)] | |
console.clear() | |
console.log('%c已找到的所有 8 位 QQ 号为:', 'font-weight: bold; color: red') | |
console.log(list.join(', ') || '暂无') | |
if (without.length) { | |
list = list.filter(v => !new RegExp(`(${without.join('|')})`).test(v)) | |
console.log( | |
'%c其中不带 %s 的 QQ 号为:', | |
'font-weight: bold; color: red', | |
without.join('、') | |
) | |
console.log(list.join(', ') || '暂无') | |
} | |
})(2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment