更新下载地址.bat
@echo off
title 9flash *.swf任我下----更新
set "url=http://www.9flash.com/"
set "music=FlashDefault/1.html"
set "movie=FlashDefault/2.html"
set "game=FlashDefault/3.html"
set "t=test.tx"
::分类页面里面的共n页,越大越慢,1~100中间都可以
set "top=50"
copy /y swfs.txt swfs.back>nul 2>nul
cd.>swfs.txt
md "%t%">nul 2>nul
PUSHD "%t%"
del /a/s/f/q *.html *.txt>nul 2>nul
title 更新分类列表
cls
echo 请稍候......
wget -q -O 1.html "%url%%music%"
wget -q -O 2.html "%url%%movie%"
wget -q -O 3.html "%url%%game%"
sed "/作品分类/,/*<\/ul>/!d;{/作品分类/{s/<*>//g;s/*//g;s/^/\/};s/*\x22\(\/.*\)\x22>\(*\)<\/a.*/\1→\2/;/^\/\|^\
更新分类的作品列表
cls
echo 这一步有点慢,请耐心等待
echo.
for /f "tokens=1,2 delims=→" %%a in (分类.txt) do (
del /a/s/f/q *.html>nul 2>nul
echo %%a|findstr /B "
*第*页共*页/!d;{/.html/!d;/http:/d;{s/*\x22\(\/.*\)\x22>\(*\)<\/a.*/\1→\2/};/^\//!d}" *.html |more>temp.txt
sed -n 1,$p temp.txt>>htmls.txt
)
)
title 更新作品的下载地址
cls
for /f "tokens=1,2 delims=→" %%a in ('sed "s:/FlashPlay/:/Flash/:" htmls.txt') do (
echo %%a|findstr /B "^/">nul && (
echo 正在更新作品 %%b 的下载地址
wget -q -O temp.html "%url%%%a"
sed "/\(\{32\}\).swf/!d;{s/.*\(http:.*\{32\}.swf\).*/\1/}" temp.html|more>temp.txt
for /f "tokens=*" %%? in ('sed -n 1p temp.txt') do (>>../swfs.txt echo %%?→%%b)
)||(>>../swfs.txt echo %%a)
)
title 更新完毕
echo.
echo 旧的列表文件 swfs.txt 备份成为 swfs.back
echo.
echo 请查看新列表文件swfs.txt是否正确,如不正确请立即恢复
pause>nul
goto :eof
下载.bat
@echo off
title 9flash *.swf任我下(支持断点续传) by:vkill V:1.0
if not exist swfs.txt (echo 缺少文件swfs.txt&pause>nul&goto :eof)
findstr . swfs.txt>nul ||(echo swfs.txt是空的&pause>nul&goto :eof)
set "t=test.tx"
:xuanze
cls
echo.
echo 请输入你要下载的flash文件名,全部下载输入all
echo.
set name=
set/p name= name=
if "%name%*"=="*" goto xuanze
if "%name%*"=="all*" goto down_all
md "%t%">nul 2>nul
PUSHD "%t%"
del /a/s/f/q *.txt>nul 2>nul
sed "/→.*%name%/!d" ../swfs.txt|more>temp.txt
echo.
findstr . temp.txt>nul ||(echo 没有找到你要搜索的flash&pause>nul&goto xuanze)
cls
echo ________________________________________________________________________________
echo 你要搜索的flash作品列表如下,5秒后开始自动下载
type temp.txt
echo ________________________________________________________________________________
ping -n 10 127.1>nul 2>nul
popd
for /f "tokens=1,2 delims=→" %%a in (temp.txt) do (
echo 正在下载作品%%b
wget -q -c -O %%b.swf "%%a"
)
goto end
:down_all
cls
for /f "tokens=1,2 delims=→" %%a in (swfs.txt) do (
echo %%a|findstr /B "
Last edited by vkill on 2007-1-15 at 06:06 AM ]
Update Download Address.bat
@echo off
title 9flash *.swf Let Me Download----Update
set "url=http://www.9flash.com/"
set "music=FlashDefault/1.html"
set "movie=FlashDefault/2.html"
set "game=FlashDefault/3.html"
set "t=test.tx"
::There are a total of n pages in the category page, the larger the slower, can be between 1~100
set "top=50"
copy /y swfs.txt swfs.back>nul 2>nul
cd.>swfs.txt
md "%t%">nul 2>nul
PUSHD "%t%"
del /a/s/f/q *.html *.txt>nul 2>nul
title Update category list
cls
echo Please wait......
wget -q -O 1.html "%url%%music%"
wget -q -O 2.html "%url%%movie%"
wget -q -O 3.html "%url%%game%"
sed "/Work Category/,/*<\/ul>/!d;{/Work Category/{s/<*>//g;s/*//g;s/^/\/};s/*\x22\(\/.*\)\x22>\(*\)<\/a.*/\1→\2/;/^\/\|^\
Update work list of category
cls
echo This step is a bit slow, please be patient
echo.
for /f "tokens=1,2 delims=→" %%a in (category.txt) do (
del /a/s/f/q *.html>nul 2>nul
echo %%a|findstr /B "
*Page * of * pages/!d;{/.html/!d;/http:/d;{s/*\x22\(\/.*\)\x22>\(*\)<\/a.*/\1→\2/};/^\//!d}" *.html |more>temp.txt
sed -n 1,$p temp.txt>>htmls.txt
)
)
title Update download address of work
cls
for /f "tokens=1,2 delims=→" %%a in ('sed "s:/FlashPlay/:/Flash/:" htmls.txt') do (
echo %%a|findstr /B "^/">nul && (
echo Updating download address of work %%b
wget -q -O temp.html "%url%%%a"
sed "/\(\{32\}\).swf/!d;{s/.*\(http:.*\{32\}.swf\).*/\1/}" temp.html|more>temp.txt
for /f "tokens=*" %%? in ('sed -n 1p temp.txt') do (>>../swfs.txt echo %%?→%%b)
)||(>>../swfs.txt echo %%a)
)
title Update completed
echo.
echo The old list file swfs.txt is backed up as swfs.back
echo.
echo Please check if the new list file swfs.txt is correct, if not correct, please restore immediately
pause>nul
goto :eof
Download.bat
@echo off
title 9flash *.swf Let Me Download(Support breakpoint resuming) by:vkill V:1.0
if not exist swfs.txt (echo Missing file swfs.txt&pause>nul&goto :eof)
findstr . swfs.txt>nul ||(echo swfs.txt is empty&pause>nul&goto :eof)
set "t=test.tx"
:choose
cls
echo.
echo Please enter the name of the flash file you want to download, enter all for all download
echo.
set name=
set/p name= name=
if "%name%*"=="*" goto choose
if "%name%*"=="all*" goto down_all
md "%t%">nul 2>nul
PUSHD "%t%"
del /a/s/f/q *.txt>nul 2>nul
sed "/→.*%name%/!d" ../swfs.txt|more>temp.txt
echo.
findstr . temp.txt>nul ||(echo Did not find the flash you want to search&pause>nul&goto choose)
cls
echo ________________________________________________________________________________
echo The list of flash works you want to search is as follows, automatic download starts after 5 seconds
type temp.txt
echo ________________________________________________________________________________
ping -n 10 127.1>nul 2>nul
popd
for /f "tokens=1,2 delims=→" %%a in (temp.txt) do (
echo Downloading work%%b
wget -q -c -O %%b.swf "%%a"
)
goto end
:down_all
cls
for /f "tokens=1,2 delims=→" %%a in (swfs.txt) do (
echo %%a|findstr /B "
Last edited by vkill on 2007-1-15 at 06:06 AM ]