中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --

联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!

中国DOS联盟论坛
现在时间是 2026-08-07 07:20
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » 原创,下载BT种子的工具。 查看 1,014 回复 9
楼 主 原创,下载BT种子的工具。 发表于 2008-01-19 00:42 ·  中国 浙江 杭州 电信
高级用户
★★
积分 537
发帖 219
注册 2007-08-04 09:43
19年会员
UID 94620
性别 男
来自 杭州--半山
状态 离线
echo today_mode
::1------------TW转贴--------------------------------------------------
::http://www.mycould.com/discuz/forum-478-1.html

curl "http://www.mycould.com/discuz/forum-479-1.html"|awk -F\042 "{if($0~/<font color.*遏肈<\/b><\/font>/){++i}};{if(i){if($0~/<em>.*typeid=.*<a href=\042thread.*\.html/){printf \"http://www.mycould.com/discuz/\"$6\"\t\"};if(/<em>2007-+-+<\/em>/){gsub(//,\"\",$0);printf $0\"\t\"};if(/<td class=\042nums\042><strong>+<\/strong> \/ <em>+<\/em><\/td>/){a=$0;i=0;{while(i<3){i++;a=gensub(/+/,\" \",i,a)}};print a}}}" >twzt\indexzt.txt


::1----------------------------------------------------------------------------


awk "BEGIN{\"date /t\"|getline;da=gensub(/-0/,\"-\",\"g\",$1)};{if($2==da){system(\"curl \" $1);print $0>\"twzt\\oldzt.txt\"}}" twzt\indexzt.txt |more>twzt\today_view_mode_zt.html

ping -n 2 127.1>nul


::1--------------------------------------------------------------------------==
::jpg_view_mode

awk "/<h2>.*\+\].*<\/h2>/,/20-+-+ :, 更Ω计:/" twzt\today_view_mode_zt.html|awk -F\042 "BEGIN{print \"^<meta http-equiv=\042Content-Type\042 content=\042text/html; charset=big5\042 /^>\"} ; {if($0~/^<img src=.*onclick=.*onload=/){++i;if(i>1){print \"^<a href=\042\"$2\"\042 target=\042_blank\042^>\"i\".jpg^</a^>\"}else{print}}else {if($0~/20-+-+ :, 更Ω计:/){i=0};print}}" >twzt\ok_today_zt.html


::由于TW的这个论坛编码为BIG5,所以在WEB 进行写入的时候加入了 代码,方便浏览器处理。
::BEGIN{print \"^<meta http-equiv=\042Content-Type\042 content=\042text/html; charset=big5\042 /^>\"}
pause
::#######################################################################

::2---------- tw原创区--------------------------------------------------------
:: http://www.mycould.com/discuz/forum-478-1.html


curl "http://www.mycould.com/discuz/forum-478-1.html"|awk -F\042 "{if($0~/<font color.*產堕肈<\/b><\/font>/){++i}};{if(i){if($0~/<em>.*typeid=.*<a href=\042thread.*\.html/){printf \"http://www.mycould.com/discuz/\"$6\"\t\"};if(/<em>2007-+-+<\/em>/){gsub(//,\"\",$0);printf $0\"\t\"};if(/<td class=\042nums\042><strong>+<\/strong> \/ <em>+<\/em><\/td>/){a=$0;i=0;{while(i<3){i++;a=gensub(/+/,\" \",i,a)}};print a}}}" |more>twyc\indexyc.txt


::2--------------------------------------------------------------------------

awk "BEGIN{\"date /t\"|getline;da=gensub(/-0/,\"-\",\"g\",$1)};{if($2==da){system(\"curl \" $1);print $0>\"twyc\\oldyc.txt\"}}" twyc\indexyc.txt >twyc\today_view_mode_yc.html

ping -n 2 127.1>nul


::2-----------------------------------------------------------------------


::jpg_view_mode

awk "/<h2>.*\+\].*<\/h2>/,/20-+-+ :, 更Ω计:/" twyc\today_view_mode_yc.html|awk -F\042 "BEGIN{print \"^<meta http-equiv=\042Content-Type\042 content=\042text/html; charset=big5\042 /^>\"} ; {if($0~/^<img src=.*onclick=.*onload=/){++i;if(i>1){print \"^<a href=\042\"$2\"\042 target=\042_blank\042^>\"i\".jpg^</a^>\"}else{print}}else {if($0~/20-+-+ :, 更Ω计:/){i=0};print}}" >twyc\ok_today_yc.html


::2--------------------------------------------------------------------------


pause


::#######################################################################
::3--------------草柳社区---------------------------------------------------



curl "http://c2088.yi.org/~mod07/thread.php?fid=2"|awk -F\042 "{if($0~/<td colspan.*style=\042border-top:.*普通主題<\/td>/){++i}};{if(i){if($0~/<h3><a href=\042readhtm/){printf \"http://c2088.yi.org/~mod07/\"$2\"\t\"};if(/<div class=\042f10\042>2007--<\/div>/){gsub(//,\"\",$3);printf $3\"\t\"};if ($0~/<td class=\042tal f10 y-style\042>+<\/td>/){gsub(//,\"\",$3);print $3}}}" |more>caoliu\indexcl.txt


::3-----------------------------------------------------------------

awk "BEGIN{\"date /t\"|getline;datet=$1};{if($2==datet){system(\"curl \" $1);print $0>>\"caoliu\\oldyc.txt\"}}" caoliu\indexcl.txt >caoliu\today_view_mode_cl.html


::3-^----------torrent_view_mode (2)------today_torrent_viewing


awk "/<tr><td class=\042h\042>.*<b>本頁主題:<\/b>/,/回 樓主.*的帖子/" caoliu\today_view_mode_cl.html|awk -F"<br>" "{if($0~/<br \/><div class=\042tpc_content.*src.*.*torrent.*/){ for (i=1;i<=NF;i++){if($i~/\.jpg/){++b;if(b>1){sub(/<img src='/,\"\",$i);sub(/'.*/,\"\",$i);print \"^<a href=\042\"$i\"\042 target=\042_blank\042^>\"b\".jpg^</a^>\"} else {print $i}}else{print $i}}}else{if($0~/回 樓主.*的帖子/){b=0};print}}"|more>caoliu\ok_today_cl.html


::---------------------------------open_web with torrent


twzt\ok_today_zt.html

pause

twyc\ok_today_yc.html

pause

caoliu\ok_today_cl.html

[ Last edited by junchen2 on 2008-1-19 at 01:01 AM ]
2 发表于 2008-01-19 00:44 ·  中国 浙江 杭州 电信
高级用户
★★
积分 537
发帖 219
注册 2007-08-04 09:43
19年会员
UID 94620
性别 男
来自 杭州--半山
状态 离线
附件
3 发表于 2008-01-19 10:00 ·  中国 上海 电信
中级用户
★★
积分 321
发帖 135
注册 2007-02-04 04:48
19年会员
UID 78578
性别 男
状态 离线
能否简单介绍一下啊
4 发表于 2008-01-19 11:52 ·  中国 江苏 苏州 电信
初级用户
积分 57
发帖 32
注册 2007-12-29 10:28
18年会员
UID 107098
性别 男
状态 离线
看不懂。
5 发表于 2008-01-19 20:56 ·  中国 河南 洛阳 新安县 电信
初级用户
积分 52
发帖 26
注册 2008-01-16 22:16
18年会员
UID 108790
性别 男
状态 离线
学习
6 发表于 2008-01-21 00:41 ·  中国 陕西 西安 电信
银牌会员
★★★★
钻石会员
积分 2,278
发帖 1,020
注册 2007-11-19 13:34
18年会员
UID 103127
性别 男
状态 离线
介绍一下详细用法
7 发表于 2008-01-21 12:29 ·  中国 浙江 杭州 电信
高级用户
★★
积分 537
发帖 219
注册 2007-08-04 09:43
19年会员
UID 94620
性别 男
来自 杭州--半山
状态 离线
保存为.BAT文件。
需要curl awk(我的是gawk被我改成了awk)
最好创建以下3个文件夹
twzt
caoliu
twyc


这个脚本下载有三种模式。
1,更新模式
2,选择人气高的种子下载模式
3,当天的模式(这个是我现在发的)

这是我一个半月前写的,最近我的ip被我下载的论坛屏蔽了,好可怜。

[ Last edited by junchen2 on 2008-1-21 at 12:31 PM ]
8 发表于 2008-01-21 12:29 ·  中国 浙江 杭州 电信
高级用户
★★
积分 537
发帖 219
注册 2007-08-04 09:43
19年会员
UID 94620
性别 男
来自 杭州--半山
状态 离线
更新了一点内容



echo today_mode
::1------------TW转贴--------------------------------------------------
::http://www.mycould.com/discuz/forum-478-1.html

curl -A "Mozilla/5.0 (Windows; U; Windows NT 5.1)" "http://www.mycould.com/discuz/forum-479-1.html"|awk -F\042 "{if($0~/<font color.*遏肈<\/b><\/font>/){++i}};{if(i){if($0~/<em>. *typeid=.*<a href=\042thread.*\.html/){printf \"http://www.mycould.com/discuz/\"$6\"\t\"};if(/<em>2007-+-+<\/em>/){gsub(//,\"\",$0);printf $0\"\t\"};if(/<td class=\042nums\042><strong>+<\/strong> \/ <em>+<\/em><\/td>/){a=$0;i=0;{while(i<3){i++;a=gensub(/+/,\" \",i,a)}};print a}}}" >twzt\indexzt.txt


::1----------------------------------------------------------------------------


awk "BEGIN{\"date /t\"|getline;da=gensub(/-0/,\"-\",\"g\",$1)};{if($2==da){system(\"curl \" $1);print $0>\"twzt\\oldzt.txt\"}}" twzt\indexzt.txt |more>twzt\today_view_mode_zt.html

ping -n 2 127.1>nul


::1--------------------------------------------------------------------------==
::jpg_view_mode

awk "/<h2>.*\+\].*<\/h2>/,/20-+-+ :, 更Ω计:/" twzt\today_view_mode_zt.html|awk -F\042 "BEGIN{print \"^<meta http-equiv=\042Content-Type\042 content=\042text/html; charset=big5\042 /^>\"} ; {if($0~/^<img src=.*onclick=.*onload=/){++i;if(i>1){print \"^<a href=\042\"$2\"\042 target=\042_blank\042^>\"i\".jpg^</a^>\"}else{print}}else {if(/<a href=\042.+\042 +target=.+\.torrent<\/a>/){sub(/<a href=\042/,\"^&http://www.mycould.com/discuz/\");print} else {if($0~/20-+-+ :, 更Ω计:/){i=0};print}}}" >twzt\ok_today_zt.html


::由于TW的这个论坛编码为BIG5,所以在WEB 进行写入的时候加入了 代码,方便浏览器处理。
::BEGIN{print \"^<meta http-equiv=\042Content-Type\042 content=\042text/html; charset=big5\042 /^>\"}

::#######################################################################

::2---------- tw原创区--------------------------------------------------------
:: http://www.mycould.com/discuz/forum-478-1.html


curl -A "Mozilla/5.0 (Windows; U; Windows NT 5.1)" "http://www.mycould.com/discuz/forum-478-1.html"|awk -F\042 "{if($0~/<font color.*產堕肈<\/b><\/font>/){++i}};{if(i){if($0~/<em>. *typeid=.*<a href=\042thread.*\.html/){printf \"http://www.mycould.com/discuz/\"$6\"\t\"};if(/<em>2007-+-+<\/em>/){gsub(//,\"\",$0);printf $0\"\t\"};if(/<td class=\042nums\042><strong>+<\/strong> \/ <em>+<\/em><\/td>/){a=$0;i=0;{while(i<3){i++;a=gensub(/+/,\" \",i,a)}};print a}}}" |more>twyc\indexyc.txt


::2--------------------------------------------------------------------------

awk "BEGIN{\"date /t\"|getline;da=gensub(/-0/,\"-\",\"g\",$1)};{if($2==da){system(\"curl \" $1);print $0>\"twyc\\oldyc.txt\"}}" twyc\indexyc.txt >twyc\today_view_mode_yc.html

ping -n 2 127.1>nul


::2-----------------------------------------------------------------------


::jpg_view_mode

awk "/<h2>.*\+\].*<\/h2>/,/20-+-+ :, 更Ω计:/" twyc\today_view_mode_yc.html|awk -F\042 "BEGIN{print \"^<meta http-equiv=\042Content-Type\042 content=\042text/html; charset=big5\042 /^>\"} ; {if($0~/^<img src=.*onclick=.*onload=/){++i;if(i>1){print \"^<a href=\042\"$2\"\042 target=\042_blank\042^>\"i\".jpg^</a^>\"}else{print}}else {if(/<a href=\042.+\042 +target=.+\.torrent<\/a>/){sub(/<a href=\042/,\"^&http://www.mycould.com/discuz/\");print} else {if($0~/20-+-+ :, 更Ω计:/){i=0};print}}}" >twyc\ok_today_yc.html


::2--------------------------------------------------------------------------





::#######################################################################
::3--------------草柳社区---------------------------------------------------



curl -A "Mozilla/5.0 (Windows; U; Windows NT 5.1)" "http://c2088.yi.org/~mod07/thread.php?fid=2"|awk -F\042 "{if($0~/<td colspan.*style=\042border-top:.*普通主題<\/td>/){++i}};{if(i){if ($0~/<h3><a href=\042readhtm/){printf \"http://c2088.yi.org/~mod07/\"$2\"\t\"};if(/<div class=\042f10\042>2007--<\/div>/){gsub(//,\"\",$3);printf $3\"\t\"};if ($0~/<td class=\042tal f10 y-style\042>+<\/td>/){gsub(//,\"\",$3);print $3}}}" |more>caoliu\indexcl.txt


::3-----------------------------------------------------------------

awk "BEGIN{\"date /t\"|getline;datet=$1};{if($2==datet){system(\"curl \" $1);print $0>>\"caoliu\\oldyc.txt\"}}" caoliu\indexcl.txt >caoliu\today_view_mode_cl.html


::3-^----------torrent_view_mode (2)------today_torrent_viewing


awk "/<tr><td class=\042h\042>.*<b>本頁主題:<\/b>/,/回 樓主.*的帖子/" caoliu\today_view_mode_cl.html|awk -F"<br>" "{if($0~/<br \/><div class=\042tpc_content.*src.*.*torrent.*/){ for (i=1;i<=NF;i++){if($i~/\.jpg/){++b;if(b>1){sub(/<img src='/,\"\",$i);sub(/'.*/,\"\",$i);print \"^<a href=\042\"$i\"\042 target=\042_blank\042^>\"b\".jpg^</a^>\"} else {print $i}}else{print $i}}}else{if($0~/回樓主.*的帖子/){b=0};print}}"|more>caoliu\ok_today_cl.html


::---------------------------------open_web with torrent


twzt\ok_today_zt.html

pause

twyc\ok_today_yc.html

pause

caoliu\ok_today_cl.html
9 发表于 2008-01-21 18:29 ·  中国 广东 东莞 电信
初级用户
积分 61
发帖 30
注册 2008-01-16 05:45
18年会员
UID 108734
性别 男
状态 离线
我看得实在很晕
10 发表于 2008-01-21 19:40 ·  中国 浙江 温州 电信
中级用户
★★
积分 458
发帖 196
注册 2006-10-05 12:04
19年会员
UID 64614
状态 离线
草榴社区没注册好像不能下载吧,嘿嘿
论坛跳转: