我的解:- @echo off&setlocal enabledelayedexpansion
- more +27 %~fs0>temp.vbs
- temp.vbs&del /q temp.vbs&set /a n+=1
- (for /f "delims=" %%a in ('findstr "【" a.txt') do (
- set "str=%%a"
- set "str=!str:【= !"&set "str=!str:】=$ !"
- for %%a in (!str!) do (
- set "a=%%a"&set "flag="&set "var=!a:~,-1!"
- if "!a:~-1!" equ "$" (
- for %%a in (!var!) do (
- if defined str!n! for /l %%b in (1,1,!n!) do if "!str%%b:%%a=!" neq "!str%%b!" set "flag=a"
- if not defined flag (
- echo 【%%a】
- for %%b in (!n!) do (
- set "a=!str%%b! %%a"
- if "!a:~8000!" equ "" (
- set "str%%b=!a!"
- ) else (
- set /a n+=1&set "str!n!=%%a"
- )
- )
- )
- )
- )
- )
- ))>$
- move $ a.txt&start a.txt&goto :eof
- Set http = createObject("Microsoft.XMLHTTP")
- http.Open "get" , "http://bbs.tt365.net.cn/viewthread.php?tid=161145" , 0
- http.send()
- Set myGet = createObject("ADODB.Stream")
- myGet.Mode = 3
- myGet.Type = 1
- myGet.Open()
- myGet.Write(http.responseBody)
- myGet.SaveToFile "a.txt" , 2
- myGet.Close
- Set myGet = Nothing
- Set http = Nothing
复制代码
|