我想要一些可以计算Google搜索排名的东西

时间:2019-05-24 05:51:04

标签: javascript excel vba google-sheets

我必须在google上搜索关键字,然后找出我公司在google搜索中的排名。

var _0x3720=['<span\x20class=\x22st\x22>','</span></td>','stripTags','stringify','prototype','replace','floor','random','sleep','slice','length','google.com','&gl=','&fp=1&dpr=2&sns=1&pf=p&tch=1&num=100&rl=lang_','&hl=','split','www','shift','join','GET','indexOf','solve\x20the\x20CAPTCHA','parse','log','searchError','fetch','getContentText','/*\x22\x22*/','VIOLATION\x20FOUND','<h3\x20class=\x22r\x22><a\x20href=\x22/url?q=','push','Google\x20is\x20asking\x20to\x20solve\x20the\x20CAPTCHA','Google\x20Apps\x20(Quota\x20Exceeded)','&amp;sa=U','://','</h3'];(function(_0x32c874,_0x13e502){var _0x5733d9=function(_0x2d447f){while(--_0x2d447f){_0x32c874['push'](_0x32c874['shift']());}};_0x5733d9(++_0x13e502);}(_0x3720,0x16e));var _0x22c4=function(_0xf4e08c,_0x308f1a){_0xf4e08c=_0xf4e08c-0x0;var _0x6a6e4c=_0x3720[_0xf4e08c];return _0x6a6e4c;};function presets(){var _0x3f720e=0x5;return{'maxRetries':_0x3f720e};}function delayFetch(){var _0x440369=Math[_0x22c4('0x0')]((Math[_0x22c4('0x1')]()*0x5f+0x2d)*0xa);Utilities[_0x22c4('0x2')](_0x440369);}function delayFetchMore(){var _0x507835=Math[_0x22c4('0x0')]((Math[_0x22c4('0x1')]()*0xc3+0x91)*0xa);Utilities[_0x22c4('0x2')](_0x507835);}function getRank(_0x257d5a,_0x1a57a9,_0x3042ac,_0x1dc635){if(!_0x257d5a)return null;var _0x32e808=[],_0x3063f3=[],_0x52d22c,_0x3aeeb8,_0x1d54cc='',_0x423b25='',_0x25677c,_0x20c0d7=null,_0x2a15fb=0x5;var _0x3267c1=_0x3042ac[_0x22c4('0x3')](-0x2,_0x3042ac[_0x22c4('0x4')]);if(_0x3042ac==_0x22c4('0x5')){_0x3267c1='us';}var _0x42b0e8='https://www.'+_0x3042ac+'/search?q='+encodeURIComponent(_0x257d5a)+_0x22c4('0x6')+_0x3267c1+_0x22c4('0x7')+_0x1a57a9+_0x22c4('0x8')+_0x1a57a9;_0x25677c=_0x1dc635[_0x22c4('0x9')]('.');if(_0x25677c[0x0]==_0x22c4('0xa'))_0x25677c[_0x22c4('0xb')]();_0x1dc635=_0x25677c[_0x22c4('0xc')]('.');try{delayFetch();var _0x410884=UrlFetchApp['fetch'](_0x42b0e8,{'muteHttpExceptions':!![],'method':_0x22c4('0xd'),'followRedirects':!![]});var _0x411759=_0x410884['getContentText']()[_0x22c4('0x9')]('/*\x22\x22*/');var _0x496293=String(_0x411759)[_0x22c4('0xe')](_0x22c4('0xf'));var _0x4bf89f;var _0x1e1c37;try{_0x4bf89f=JSON[_0x22c4('0x10')](_0x411759[0x3]);}catch(_0x1b9145){console[_0x22c4('0x11')]({'Message':_0x22c4('0x12'),'initialData':_0x411759});}var _0x2f0131=0x0;while(_0x496293!=-0x1&&_0x2f0131<0x14){delayFetchMore();_0x410884=UrlFetchApp[_0x22c4('0x13')](_0x42b0e8,{'muteHttpExceptions':!![],'method':'GET','followRedirects':!![]});_0x411759=_0x410884[_0x22c4('0x14')]()[_0x22c4('0x9')](_0x22c4('0x15'));_0x496293=String(_0x411759)['indexOf']('solve\x20the\x20CAPTCHA');console[_0x22c4('0x11')]({'Message':_0x22c4('0x16'),'initialData':_0x411759});_0x2f0131++;}try{var _0x74886e=_0x4bf89f['d']['split'](_0x22c4('0x17'));}catch(_0x399be7){_0x3063f3[_0x22c4('0x18')](['-',_0x22c4('0x19'),null,null,null,null,null]);return _0x3063f3;}var _0x5bb23b=0x4;while(_0x74886e[0x1]==null&&_0x5bb23b<0x9){_0x5bb23b++;_0x4bf89f=JSON['parse'](_0x411759[_0x5bb23b]);_0x74886e=_0x4bf89f['d'][_0x22c4('0x9')](_0x22c4('0x17'));}if(_0x74886e[0x1]==null){_0x3063f3[_0x22c4('0x18')](['-',_0x22c4('0x1a'),null,null,null,null,null]);return _0x3063f3;}else{for(var _0x407042=0x1;_0x407042<_0x74886e['length'];_0x407042++){_0x52d22c=decodeURIComponent(_0x74886e[_0x407042][_0x22c4('0x9')](_0x22c4('0x1b'))[0x0]);_0x3aeeb8=_0x52d22c[_0x22c4('0x9')](_0x22c4('0x1c'))[0x1];if(_0x3aeeb8[_0x22c4('0xe')]('/')!==-0x1)_0x3aeeb8=_0x3aeeb8['split']('/')[0x0];_0x25677c=_0x3aeeb8[_0x22c4('0x9')]('.');if(_0x25677c[0x0]==_0x22c4('0xa'))_0x25677c[_0x22c4('0xb')]();_0x3aeeb8=_0x25677c['join']('.');_0x32e808[_0x22c4('0x18')](_0x52d22c);if(_0x1dc635==_0x3aeeb8&&!_0x20c0d7){_0x20c0d7=_0x407042;_0x1d54cc='<'+_0x74886e[_0x407042][_0x22c4('0x9')](_0x22c4('0x1d'))[0x0];_0x423b25=_0x74886e[_0x407042][_0x22c4('0x9')](_0x22c4('0x1e'))[0x1][_0x22c4('0x9')]('</span><br></div>')[0x0]['split'](_0x22c4('0x1f'))[0x0];}}if(_0x32e808[0x0]){_0x3063f3[_0x22c4('0x18')]([_0x20c0d7||'-',_0x32e808[_0x20c0d7-0x1]||'Not\x20ranked',_0x32e808[_0x20c0d7-0x2]||null,_0x32e808[_0x20c0d7]||null,_0x32e808[0x0],_0x1d54cc[_0x22c4('0x20')](),_0x423b25[_0x22c4('0x20')]()]);return _0x3063f3;}else{_0x3063f3[_0x22c4('0x18')]([_0x20c0d7||'-',_0x32e808[_0x20c0d7-0x1]||'No\x20response',_0x32e808[_0x20c0d7-0x2]||null,_0x32e808[_0x20c0d7]||null,_0x32e808[0x0],_0x1d54cc[_0x22c4('0x20')](),_0x423b25[_0x22c4('0x20')]()]);return _0x3063f3;}}}catch(_0x298785){return JSON[_0x22c4('0x21')](_0x298785);}}String[_0x22c4('0x22')][_0x22c4('0x20')]=function(){var _0x4915af=this['replace'](/(<\/span><br>)/g,'\x0a');return _0x4915af[_0x22c4('0x23')](/<[^>]+>/gim,'')[_0x22c4('0x23')](/&#39;/gim,'\x27')[_0x22c4('0x23')](/&nbsp;/gim,'\x20')['replace'](/&amp;/gim,'&')[_0x22c4('0x23')](/&quot;/gim,'\x22');};

我已经在线尝试了许多工具,但是都无法使用

0 个答案:

没有答案