Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function tc1(a){
- var qm=10,ql=0,l=a.length,i=0,t0=new Date;
- function djb2(str){var hash=5381;for(var i=0;i<str.length;i++){char=str.charCodeAt(i);hash=(hash<<5)+hash+char}return hash>>>0};
- console.log(l);
- function call1(v) {
- if (!v) return false;
- var t1=new Date();
- fetch("https://s"+djb2(v)%3+".rg443.tk/p/tc.php?q="+v).then(function(r){ql--;if (r.ok) {return r.json()}else {return {}} })
- .then(function(d){
- var x=0;
- if (d && d.resolutions) x=d.resolutions.length;
- console.log(i,new Date-t1,v,x);
- if (i==l) {
- console.log("done",i,new Date - t0, (i/(new Date-t0+1)*1000).toFixed(1));
- }
- while (ql<qm && i<l) {
- ql++;i++
- call1(a[i]);
- }
- })
- }
- call1(a[i]);
- }
- tc1(document.body.innerHTML.match(/^\d+\.\d+\.\d+\.\d+/gim))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement