diff options
author | bbs <bbs@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-03-01 14:12:20 +0800 |
---|---|---|
committer | bbs <bbs@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2003-03-01 14:12:20 +0800 |
commit | e9e094563c64aea95858955835e417d0d6083b0a (patch) | |
tree | 1b0e6f663d11430a3f7326267f1dbdab9615f4f6 | |
parent | 63a3064bdaf6547a3257c62c542b7657fc3992d9 (diff) | |
download | pttbbs-e9e094563c64aea95858955835e417d0d6083b0a.tar pttbbs-e9e094563c64aea95858955835e417d0d6083b0a.tar.gz pttbbs-e9e094563c64aea95858955835e417d0d6083b0a.tar.bz2 pttbbs-e9e094563c64aea95858955835e417d0d6083b0a.tar.lz pttbbs-e9e094563c64aea95858955835e417d0d6083b0a.tar.xz pttbbs-e9e094563c64aea95858955835e417d0d6083b0a.tar.zst pttbbs-e9e094563c64aea95858955835e417d0d6083b0a.zip |
use another source instead
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk@681 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | pttbbs/util/weather.perl | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/pttbbs/util/weather.perl b/pttbbs/util/weather.perl index 911ff804..5e2c8d4f 100644 --- a/pttbbs/util/weather.perl +++ b/pttbbs/util/weather.perl @@ -1,5 +1,5 @@ #!/usr/bin/perl -# $Id: weather.perl,v 1.4 2003/02/07 15:09:14 victor Exp $ +# $Id: weather.perl,v 1.5 2003/03/01 06:12:20 bbs Exp $ # # 不能跑的話,看看 bbspost 的路徑是否正確。 # 如果發出的 post 沒有氣象報告而是說 URL 找不到,則確定一下能不能看到 @@ -19,9 +19,15 @@ close DATE; # Header # 內容 -open(WEATHER, "$LYNX -assume_charset=big5 -assume_local_charset=big5 -dump http://www.cwb.gov.tw/V3.0/weather/text/W03.htm |"); +#open(WEATHER, "$LYNX -assume_charset=big5 -assume_local_charset=big5 -dump http://www.cwb.gov.tw/V3.0/weather/text/W03.htm |"); +open(WEATHER, "$LYNX -assume_charset=big5 -assume_local_charset=big5 -dump -nolist http://www.libertytimes.com.tw/2003/new/mar/today/Wnews1.htm|"); while (<WEATHER>) { + last if /今日天氣/; +} + +while (<WEATHER>) { + last if /top\.gif/; print BBSPOST if ($_ ne "\n"); } close WEATHER; |