本帖最后由 pcl_test 于 2015-9-19 10:27 编辑
全部htm下载完成后运行- //&cls&dir /b *.htm|cscript.exe -nologo -e:jscript "%~f0"&pause&exit/b
-
- while(!WScript.StdIn.AtEndOfStream){
- var file = WScript.StdIn.ReadLine();
- var fname = file.replace(/\.[^\.]*$/,'');
- var fso = new ActiveXObject("Scripting.FileSystemObject");
- var f = fso.OpenTextFile(file,1);
- var txt = f.ReadAll().match(/\*{8,}[\s\S]+?\*{8,}/m)[0];
- var m = txt.match(/start[^<]+/img);
- var str = '';
- for (var i=0;i<m.length;i++){
- str +=m[i].replace(/\r?\n/g,' ')+'\r\n';
- }
- fso.CreateTextFile(fname+'.txt',2).Write(str);
- }
复制代码
|