CODE: [Copy to clipboard]
:lotus516于12月9日于bbs.cn-dos.net
e:
cd E:\自编程序区
curl -o tmp.txt http://bt.ydy.com
for /f "tokens=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,* delims=&<>" %%a in (tmp.txt) do echo %%a%%b%%c%%d%%e%%f%%g%%h%%i%%j%%k%%l%%m%%n%%o%%p%%q%%r%%s%%t%%u%%v%%w%%x%%y%%z>>E:\BitSpirit\Torrent\Readable\1.txt
del tmp.txt
cd E:\BitSpirit\Torrent\Readable
e:
dir /a-d /b *.torrent>zzwj_list.txt
set zzwjm=1
:2
set zzwjm=%zzwjm%
for /f "skip=%zzwjm% tokens=*" %%i in (zzwj.txt) do (
set /a zzwjm+=1
set wj=%%i&&goto :1
)
goto :end
:1
set count=1
set num2=1
:begin
set count=%count%
for /f "skip=%count% tokens=*" %%i in (1.txt) do (
set /a count+=1
echo "%%i"|findstr "%wj%">nul && goto :ok
)
goto 2
:ok
if "num2"=="1" set /a count=%count%-1&&set num2=2
for /f "skip=%count% tokens=3 delims==" %%i in (1.txt) do set zz=%%i&&goto dd
:dd
set ZZ2=%zz:~0,-8%
for /f "delims=" %%j in (zzwj_list.txt) do echo "%zz2%"|findstr "%%j">nul && goto :begin
curl -O %zz2%
start E:\BitSpirit\BitSpirit.exe %zz2%
goto begin
:end
del 1.txt
下面是zzwj.txtCODE: [Copy to clipboard]
:lotus516于12月9日于bbs.cn-dos.net
setlocal ENABLEDELAYEDEXPANSION
:1
curl -O "http://weather.265.com/hn.htm"
if not exist hn.htm goto 1
cd.>1.txt
for /f "tokens=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,* delims=&<>/" %%a in (hn.htm) do echo %%a%%b%%c%%d%%e%%f%%g%%h%%i%%j%%k%%l%%m%%n%%o%%p%%q%%r%%s%%t%%u%%v%%w%%x%%y%%z>>1.txt
set count=1
set num=1
:2
for /f "skip=%count% tokens=*" %%i in (1.txt) do (
set /a count+=1
echo %%i|findstr "58828">nul &&goto :ok
)
:ok
if "%num%"=="1" set num=2&&goto :2
cd.>2.txt
for /f "skip=%count% tokens=*" %%i in (1.txt) do (
echo %%i|findstr "name">nul && goto :end
echo %%i>>2.txt
)
:end
pause
cd.>3.txt
for /f "tokens=1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,* delims=abcdefghijklmnopqrstuvwxyz" %%a in (2.txt) do echo %%a%%b%%c%%d%%e%%f%%g%%h%%i%%j%%k%%l%%m%%n%%o%%p%%q%%r%%s%%t%%u%%v%%w%%x%%y%%z>>3.txt
cd.>4.txt
for /f "tokens=1,2,3,4,5,* delims=:" %%a in (3.txt) do if "%%b"=="" (echo %%a>>4.txt) else (echo %%b>>4.txt )
cd.>5.txt
for /f "tokens=1,2,3,* delims==" %%a in (4.txt) do if "%%c"=="" (echo %%a>>5.txt) else (echo %%c>>5.txt )
for /f "tokens=*" %%a in (5.txt) do call set "var=%%var%%%%a"
echo %var%>6.txt
del hn.htm 1.txt 2.txt 3.txt 4.txt 5.txt
for /f "tokens=1,2,3,4,5,6,7,8,9,10,11,12 delims= " %%a in (6.txt) do (
set 温度1=%%a
set 上午1=%%b
set 中午1=%%c
set 晚上1=%%d
set 温度2=%%e
set 上午2=%%f
set 中午2=%%g
set 晚上2=%%h
set 温度3=%%i
set 上午3=%%j
set 中午3=%%k
set 晚上3=%%l
)
copy /y E:\自编程序区\1.htm E:\自编程序区\2.htm
set replaced=温度1&&set all=%温度1%
call :th
set replaced=上午1&&set all=%上午1%
call :th
set replaced=中午1&&set all=%中午1%
call :th
set replaced=晚上1&&set all=%晚上1%
call :th
set replaced=温度2&&set all=%温度2%
call :th
set replaced=上午2&&set all=%上午2%
call :th
set replaced=中午2&&set all=%中午2%
call :th
set replaced=晚上2&&set all=%晚上2%
call :th
set replaced=温度3&&set all=%温度3%
call :th
set replaced=上午3&&set all=%上午3%
call :th
set replaced=中午3&&set all=%中午3%
call :th
set replaced=晚上3&&set all=%晚上3%
call :th
for /f "delims=" %%i in ('type "index.htm"') do echo %%i>>2.htm
copy E:\自编程序区\2.htm l:\index.htm
goto :eof
:th
setlocal enabledelayedexpansion
for /f "delims=" %%i in ('type "index.htm"') do (
set str=%%i
set "str=!str:%replaced%=%all%!"
echo !str!>>index.htm_tmp.txt
)
del /q index.htm
ren index.htm_tmp.txt index.htm
goto :eof
index.htm见附见,改一下后缀名!!