本帖最后由 pcl_test 于 2015-9-3 00:38 编辑
- <!-- :
- @echo off&mshta "%~f0"&pause&exit /b
- -->
-
- <script>
- var fso = new ActiveXObject("Scripting.FileSystemObject");
- //设置网址
- var url = "http://q10000.howbbs.com/posts/list/15681/540451.html";
- var http = new ActiveXObject("Msxml2.XMLHTTP");
- http.open("GET", url, false);
- http.send(null);
- var m = http.responseText.match(/\*{10,}[\s\S]+\*{10,}/m);
- var txt = m[0].replace(/\*+|<br\s*\/>\s*|<[^>]+>/g,'').replace(/ /g,' ');
- fso.CreateTextFile('结果.txt',2).Write(txt.replace(/^[\r?\n]+/mg,''));
- close();
- </script>
复制代码
|