[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
返回列表 发帖
本帖最后由 flashercs 于 2018-9-30 00:41 编辑

http://www.1juzi.com/
  1. (function(){function n(n){var a,u,g;g=e(n);try{a=g.match(l)[0]}catch(n){a=""}for(;u=d.exec(a);)try{i(h+u[1])}catch(n){if("1"==n)continue;throw n}finally{}}function i(n){var i,o=e(n),r="";try{i=o.match(j)[1],r=o.match(x)[1].match(/<p>[\S\s]*?<\/p>/gi).join("").replace(y,a).replace(/&middot;/g,"·").replace(/&mdash;/g,"—").replace(/&ldquo;/g,"“").replace(/&rdquo;/g,"”").replace(/&hellip;/g,"……").replace(/&lsquo;/g,"‘").replace(/&rsquo;/g,"’")}catch(i){throw u(i,"url="+n),"1"}try{g.WriteLine("A"+i+r.replace(m,""))}catch(n){u(n,"Writing to file "+t+" failed.")}finally{}}function e(n){var i;return r.open("GET",n,!1),r.send(),200===r.status?(c.Type=1,c.Open(),c.Write(r.responseBody),c.Position=0,c.Type=2,c.Charset="gbk",i=c.ReadText(),c.Close(),i):(u('fetch URI "'+n+'" failed.\nstatus: '+r.status),"")}function a(n){return"</p>"===n.toLowerCase()?"\r\n":""}function u(n,i){WScript.Echo("[object Error]"===Object.prototype.toString.call(n)?[n.name,"source: "+(void 0===i?"":i),"number: "+(n.number>>>0).toString(16),"equipment: "+(n.number>>16&8191),"code: "+(65535&n.number),"Information: "+n.message].join("\n"):n)}var g,t,o,r=function(){for(var n=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],i=0;i<n.length;i++)try{return new ActiveXObject(n[i])}catch(n){}u("Can't build XMLHTTP automation object."),WScript.Quit(1)}(),c=new ActiveXObject("ADODB.Stream"),s=new ActiveXObject("Scripting.FileSystemObject"),h="http://www.1juzi.com/",l=/<ul[^>]+class=["']alist["'][^>]*>[\S\s]*?<\/ul>/i,d=/<a[^>]+href=["']([^"']+)["'][^>]*>[^<>]*<\/a>/gi,j=/<h1>([\S\s]+?)<\/h1>/i,x=/<div[^>]+class=["']content["'][^>]*>\s*<div[^>]+class="news"[^>]*>[\S\s]*?<\/div>([\S\s]+?)<\/div>/i,y=/<strong>[\S\s]*?<\/strong>|<[^>]*>|(?:&nbsp;|\n|\r)+/gi,m=/\n\s*(?=\n)/g,p={"唯美的句子":"/weimeidejuzi/","伤感的句子":"/shanggandejuzi/","幸福的句子":"/xingfudejuzi/","爱情的句子":"/aiqingdejuzi/","表白的句子":"/biaobaidejuzi/","励志的句子":"/lizhidejuzi/","正能量的句子":"/zhengnengliangdejuzi/","经典句子":"/jingdianjuzi/","好词好句":"/haocihaoju/","励志名言":"/lizhimingyan/","名人名言":"/mingrenmingyan/","名言警句":"/mingyanjingju/","读书名言":"/dushumingyan/","爱国名言":"/aiguomingyan/","英语名言":"/yingyumingyan/","经典名言":"/jingdianmingyan/","经典语录":"/jingdianyulu/","名人语录":"/mingrenyulu/","励志语录":"/lizhiyulu/","正能量语录":"/zhengnengliangyulu/","情感语录":"/qingganyulu/","心情语录":"/xinqingyulu/","爱情语录":"/aiqingyulu/","伤感语录":"/shangganyulu/","搞笑语录":"/gaoxiaoyulu/","人生格言":"/renshenggeyan/","励志格言":"/lizhigeyan/","爱情格言":"/aiqinggeyan/","经典格言":"/jingdiangeyan/","英语格言":"/yingyugeyan/","节日诗句":"/jierishiju/","写景诗句":"/xiejingshiju/","抒情诗句":"/shuqingshiju/","爱国诗句":"/aiguoshiju/","说说心情短语":"/shuoshuoxinqingduanyu/","伤感说说":"/shangganshuoshuo/","空间说说":"/kongjianshuoshuo/","经典说说":"/jingdianshuoshuo/","搞笑说说":"/gaoxiaoshuoshuo/","个性说说":"/gexingshuoshuo/","个性签名":"/gexingqianming/","QQ个性签名":"/qqgexingqianming/","伤感个性签名":"/shanggangexingqianming/","搞笑个性签名":"/gaoxiaogexingqianming/","励志个性签名":"/lizhigexingqianming/","女生个性签名":"/nvshenggexingqianming/","幸福个性签名":"/xingfugexingqianming/","情侣个性签名":"/qinglvgexingqianming/","超拽个性签名":"/chaozhuaigexingqianming/","春节短信":"/chunjieduanxin/","情人节短信":"/qingrenjieduanxin/","元宵节短信":"/yuanxiaojieduanxin/","生日短信":"/shengriduanxin/","结婚短信":"/jiehunduanxin/","妇女节短信":"/funvjieduanxin/","愚人节短信":"/yurenjieduanxin/","劳动节短信":"/laodongjieduanxin/","母亲节短信":"/muqinjieduanxin/","父亲节短信":"/fuqinjieduanxin/","端午节短信":"/duanwujieduanxin/","七夕节短信":"/qixijieduanxin/","中秋节短信":"/zhongqiujieduanxin/","感恩节短信":"/ganenjieduanxin/","圣诞节短信":"/shengdanjieduanxin/","儿童节短信":"/ertongjieduanxin/","经典短信":"/jingdianduanxin/","国庆节短信":"/guoqingjieduanxin/","教师节短信":"/jiaoshijieduanxin/"};new ActiveXObject("WScript.Shell").CurrentDirectory=s.GetParentFolderName(WScript.ScriptFullName),c.Mode=3;for(var q=0,f=arguments.length;q<f;++q)if(o=arguments[q],p[o]){t=o+".txt";try{g=s.OpenTextFile(t,2,!0)}catch(n){u(n,"Opening file "+t);continue}try{n(h+p[o])}catch(n){u(n)}g.Close()}else u("Cannot find "+o);WScript.Echo("Mission complete.")})("唯美的句子","伤感的句子","幸福的句子","爱情的句子","表白的句子","励志的句子","正能量的句子","经典句子","好词好句","励志名言","名人名言","名言警句","读书名言","爱国名言","英语名言","经典名言","经典语录","名人语录","励志语录","正能量语录","情感语录","心情语录","爱情语录","伤感语录","搞笑语录","人生格言","励志格言","爱情格言","经典格言","英语格言","节日诗句","写景诗句","抒情诗句","爱国诗句","说说心情短语","伤感说说","空间说说","经典说说","搞笑说说","个性说说","个性签名","QQ个性签名","伤感个性签名","搞笑个性签名","励志个性签名","女生个性签名","幸福个性签名","情侣个性签名","超拽个性签名","春节短信","情人节短信","元宵节短信","生日短信","结婚短信","妇女节短信","愚人节短信","劳动节短信","母亲节短信","父亲节短信","端午节短信","七夕节短信","中秋节短信","感恩节短信","圣诞节短信","儿童节短信","经典短信","国庆节短信","教师节短信");
复制代码
1

评分人数

TOP

本帖最后由 flashercs 于 2018-9-30 00:44 编辑

http://www.ceasm.com/
  1. (function(){function e(e){for(var c,a,i,n,o=e.replace(/[^\/]+$/,"");;){n=r(e);try{c=n.match(g)[0]}catch(e){c=""}try{a=n.match(v)[0]}catch(e){a=""}for(;i=S.exec(c);)try{t(f+i[1])}catch(e){if("1"==e)continue;throw e}finally{}if(!(i=a.match(b)))break;e=o+i[1]}}function t(e){var t,i,s=r(e),l="";t=e.replace(/[^\/]+$/,"");try{for(i=s.match(y)[1];;){l+=s.match(M)[0].replace(T,c);try{s=r(t+s.match(v)[0].match(b)[1])}catch(e){break}}}catch(e){throw"1"}try{n.WriteLine("A"+i+"\r\n"+l.replace(/&middot;/g,"·").replace(/&mdash;/g,"—").replace(/&ldquo;/g,"“").replace(/&rdquo;/g,"”").replace(/&hellip;/g,"……").replace(/&lsquo;/g,"‘").replace(/&rsquo;/g,"’").replace(/文章转自.*$/,"").replace(X,""))}catch(e){a(e,"Writing to file "+o+" failed.")}finally{}}function r(e){var t;return h.open("GET",e,!1),h.send(),200===h.status?(p.Type=1,p.Open(),p.Write(h.responseBody),p.Position=0,p.Type=2,p.Charset="gbk",t=p.ReadText(),p.Close(),t):(a('fetch URI "'+e+'" failed.\nstatus: '+h.status),"")}function c(e){var t=e.toLowerCase();return"</div>"===t||"</p>"===t?"\r\n":""}function a(e,t){WScript.Echo("[object Error]"===Object.prototype.toString.call(e)?[e.name,"source: "+(void 0===t?"":t),"number: "+(e.number>>>0).toString(16),"equipment: "+(e.number>>16&8191),"code: "+(65535&e.number),"Information: "+e.message].join("\n"):e)}var i,n,o,s,l,h=function(){for(var e=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],t=0;t<e.length;t++)try{return new ActiveXObject(e[t])}catch(e){}a("Can't build XMLHTTP automation object."),WScript.Quit(1)}(),p=new ActiveXObject("ADODB.Stream"),u=new ActiveXObject("Scripting.FileSystemObject"),f="http://www.ceasm.com/",d=/<div[^>]+class=['"]keywords['"'[^>]*>[\S\s]+?<\/div>/i,m=/<a[^>]+href=["']([^"']+)["'][^>]*>([^<>]*)<\/a>/gi,g=/<ul[^>]+class=["']dedelist["'][^>]*>[\S\s]+?<\/ul>/i,v=/<div[^>]+class=["']dede_pages["'][^>]*>[\S\s]+?<\/div>/i,S=/<h4>\s*<a[^>]+href=["']([^"']+)["'][^>]*>[^<>]*<\/a>\s*<\/h4>/gi,b=/<a[^>]+href=["']([^"']+)["'][^>]*>下一页<\/a>/i,y=/<h2>([\S\s]+?)<\/h2>/i,M=/<div[^>]+class=["']text["'][^>]*>\s*<table[^>]*>[\S\s]+?<\/table>/i,T=/<[^>]*>|(?:\s|\u3000|&nbsp;)+/gi,X=/\n\s*(?=\n)/g;new ActiveXObject("WScript.Shell").CurrentDirectory=u.GetParentFolderName(WScript.ScriptFullName),p.Mode=3;var w=r(f);i=w.match(/<div[^>]+class="menu"[^>]*>[\S\s]*?<\/div>/i),i||(a("No navMenu."),WScript.Quit(1)),s=i[0];for(var L=0,O=arguments.length;L<O;++L)if(i=s.match(RegExp('<a[^>]+href="([^"]+)"[^>]*>'+arguments[L],"i"))){o=arguments[L]+".txt";try{n=u.OpenTextFile(o,2,!0)}catch(e){a(e,"Opening file "+o);continue}for(l=d.exec(r(i[1]));i=m.exec(l);)try{e(f+i[1])}catch(e){a(e)}n.Close()}else a("Cannot find "+arguments[L]);WScript.Echo("Mission complete.")})("励志名言","名人名言","励志文章","人生感悟","经典语录","经典句子","散文精选","情感日志");
复制代码
1

评分人数

TOP

本帖最后由 flashercs 于 2018-10-6 10:07 编辑
  1. function showError(e,t){tsLog.WriteLine("[object Error]"===Object.prototype.toString.call(e)?[e.name,"source: "+(void 0===t?"":t),"number: "+(e.number>>>0).toString(16),"equipment: "+(e.number>>16&8191),"code: "+(65535&e.number),"Information: "+e.message].join("\r\n"):e)}function getHTML(e){xhr.open("GET",e,!1),xhr.setRequestHeader("Accept","text/html, application/xhtml+xml, application/xml; q=0.9, */*; q=0.8"),xhr.setRequestHeader("Accept-Language","en-US, en; q=0.8, zh-Hans-CN; q=0.5, zh-Hans; q=0.3"),xhr.setRequestHeader("Accept-Encoding","gzip, deflate"),xhr.setRequestHeader("TE","gzip, deflate"),xhr.setRequestHeader("Connection","close"),xhr.setRequestHeader("Cache-Control","no-cache"),xhr.setRequestHeader("User-Agent","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/17.17134"),xhr.setRequestHeader("Upgrade-Insecure-Requests","1");try{xhr.send()}catch(e){}}function parseXML(e){var t;return 0===e.parseError.errorCode||(t=e.parseError,showError(["You have error ","reason: "+t.reason,"code: "+(t.errorCode>>>0).toString(16),"filepos: "+t.filepos,"line: "+t.line,"linepos: "+t.linepos,"srcText: "+t.srcText,"url: "+t.url].join("\n")),!1)}function getContent(e){var t,o,r,c,s,i;if(getHTML(e),200===xhr.status){for(document.open(),document.write(xhr.responseText),document.close(),t=document.getElementById("content"),c=t.firstChild;c&&(1!==c.nodeType||"Post"!==c.className);)c=c.nextSibling;if(c){for(i=c.firstChild;i&&"PostHead"!==i.className;)i=i.nextSibling;if(i){for(s=i.getElementsByTagName("h2"),s=s?s[0].innerText:"",t=c.firstChild;t&&"PostContent"!==t.className;)t=t.nextSibling;if(t){for(o=t.childNodes,r=o.length-1;r>=0;--r)(re1.test(o[r].className)||re2.test(o[r].nodeName))&&t.removeChild(o[r]);try{ts.WriteLine("A"+(s+"\r\n"+t.innerText).replace(re3,"\r\n").replace(re4,"")),tsCache.WriteLine(e)}catch(t){showError(t,e)}}}}}}var xhr=function(){for(var e=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],t=0;t<e.length;t++)try{return WScript.CreateObject(e[t])}catch(e){}WScript.Quit(1)}(),xmlDoc,xmlDoc2,sitemap="https://www.lz13.cn/sitemap.xml",sitemapValue,document=new ActiveXObject("htmlfile"),fso=new ActiveXObject("Scripting.FileSystemObject"),ts,tsLog,tsCache,file="lizhi13.txt",oSelection,oSelection2,nodeLoc,re1=/left_box\d*|blank.*|pager/,re2=/ul|ol/i,re3=/[\r\n][\s\u3000]+/g,re4=/^[\s\u3000]+|\s+$/g,logfile=encodeURIComponent(sitemap)+".log",cachefile="$cache.log",oCache={};try{tsLog=fso.OpenTextFile(logfile,8,!0)}catch(e){WScript.Echo("can not write log file "+logfile),WScript.Quit(2)}try{tsCache=fso.OpenTextFile(cachefile,1,!0)}catch(e){WScript.Echo("can not read cache file "+cachefile),WScript.Quit(2)}for(;!tsCache.AtEndOfStream;)oCache[tsCache.ReadLine()]=1;tsCache.Close();try{tsCache=fso.OpenTextFile(cachefile,8,!0)}catch(e){WScript.Echo("can not write cache file "+cachefile),WScript.Quit(2)}try{ts=fso.OpenTextFile(file,8,!0,-1)}catch(e){showError(e,"can not write file "+file),WScript.Quit(3)}try{if(getHTML(sitemap),200===xhr.status){xmlDoc=xhr.responseXML,null==xmlDoc&&(showError("The content is not a XML.URL="+sitemap),WScript.Quit(4)),parseXML(xmlDoc)||WScript.Quit(5),xmlDoc.setProperty("SelectionLanguage","XPath"),xmlDoc.setProperty("SelectionNamespaces",""),oSelection=xmlDoc.selectNodes("sitemapindex/sitemap/loc/text()");for(var i=0,l=oSelection.length-1;i<l;++i)if(sitemapValue=oSelection.item(i).nodeValue,!oCache[sitemapValue])if(getHTML(sitemapValue),200===xhr.status){if(xmlDoc2=xhr.responseXML,null==xmlDoc2){showError("The Content is not a XML.URL="+sitemapValue);continue}if(!parseXML(xmlDoc2))continue;for(xmlDoc2.setProperty("SelectionLanguage","XPath"),xmlDoc2.setProperty("SelectionNamespaces",'xmlns:t="'+xmlDoc2.documentElement.getAttribute("xmlns")+'"'),oSelection2=xmlDoc2.selectNodes("t:urlset/t:url/t:loc/text()");nodeLoc=oSelection2.nextNode();)if(!oCache[nodeLoc.nodeValue])try{getContent(nodeLoc.nodeValue)}catch(e){}tsCache.WriteLine(sitemapValue)}else showError("status"+xhr.status+"\r\n"+xhr.getAllResponseHeaders())}else showError("status"+xhr.status+"\r\n"+xhr.getAllResponseHeaders())}catch(e){throw showError(e),e}finally{ts.Close(),tsLog.Close(),tsCache.Close()}WScript.Echo("Mission complete."),WScript.Quit(0);
复制代码

TOP

返回列表