junchen2
高级用户
积分 537
发帖 219
注册 2007-8-4 来自 杭州--半山
状态 离线
|
『楼 主』:
补充附件,不好意思!
刚才发不上来
更新了一点内容
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-[0-9]+-[0-9]+<\/em>/){gsub(/[^\-0-9]/,\"\",$0);printf $0\"\t\"};if(/<td class=\042nums\042><strong>[0-9]+<\/strong> \/ <em>[0-9]+<\/em><\/td>/){a=$0;i=0;{while(i<3){i++;a=gensub(/[^0-9]+/,\" \",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>.*\[[0-9a-z]+\].*<\/h2>/,/20[0-1][0-9]-[0-9]+-[0-9]+ [0-9][0-9]:[0-9][0-9], 更Ω计:/" 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[0-1][0-9]-[0-9]+-[0-9]+ [0-9][0-9]:[0-9][0-9], 更Ω计:/){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-[0-9]+-[0-9]+<\/em>/){gsub(/[^\-0-9]/,\"\",$0);printf $0\"\t\"};if(/<td class=\042nums\042><strong>[0-9]+<\/strong> \/ <em>[0-9]+<\/em><\/td>/){a=$0;i=0;{while(i<3){i++;a=gensub(/[^0-9]+/,\" \",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>.*\[[0-9a-z]+\].*<\/h2>/,/20[0-1][0-9]-[0-9]+-[0-9]+ [0-9][0-9]:[0-9][0-9], 更Ω计:/" 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[0-1][0-9]-[0-9]+-[0-9]+ [0-9][0-9]:[0-9][0-9], 更Ω计:/){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-[0-9][0-9]-[0-9][0-9]<\/div>/){gsub(/[^\-0-9]/,\"\",$3);printf $3\"\t\"};if ($0~/<td class=\042tal f10 y-style\042>[0-9]+<\/td>/){gsub(/[^0-9]/,\"\",$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 12:51 AM ]
|
|