| View previous topic :: View next topic |
| Author |
Message |
FcLan Halfop
Joined: 30 Sep 2005 Posts: 64 Location: Poland
|
Posted: Sun Dec 04, 2005 10:28 am Post subject: Why don`t works?! |
|
|
| Code: | package require http
bind msg - !test test_check
proc test_check {nick host hand chan text} {
set url "http://www.sensiblesoccer.de/index.php?lng=en"
set counter 0
set limit "4"
catch { set connection [http::geturl $url -timeout 3000] } error
if {[string match -nocase "*::http::*" $error]} {
set source [http::data $connection];http::cleanup $connection
set source [string map -nocase {"</item>" "|"} $source]
foreach line [split $source |] {
if {[regexp {^.*?<td class="medium"><b class="marker">(.*?)</tr>.*?$} $line tmp lines ]} {
regexp {^.*?<td class="medium"><b class="marker">(.*?)</font></td>.*?$} $lines tmp titel
regexp {^.*<td class="right_rank_header" style="color:silver" bgcolor="#000022">(.*?)*?} $lines tmp link
putserv "PRIVMSG $nick :$titel"
putserv "PRIVMSG $nick :works!:D"
incr counter
}
if {$counter == $limit} {unset counter;return 0}
}
}
}
putlog "news loaded!" |
This script don`t works the htm code looks:
| Code: | <td class="medium"><b class="marker">New Interview with Jon Hare</font></td>
</tr>
<tr height="16">
<td class="right_rank_header" style="color:silver" bgcolor="#000022">.. by autor on 02.12.2005</td>
</tr> |
I want to get latest news and autor...: New Interview with Jon Hare by autor on 02.12.2005 |
|
| Back to top |
|
 |
demond Revered One

Joined: 12 Jun 2004 Posts: 3073 Location: San Francisco, CA
|
Posted: Sun Dec 04, 2005 1:36 pm Post subject: |
|
|
check out this _________________ connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code |
|
| Back to top |
|
 |
FcLan Halfop
Joined: 30 Sep 2005 Posts: 64 Location: Poland
|
Posted: Sun Dec 04, 2005 1:57 pm Post subject: |
|
|
| Yes, thanks, but my code looks hardly :/ |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Sun Dec 04, 2005 7:29 pm Post subject: |
|
|
| FcLan wrote: | | Yes, thanks, but my code looks hardly :/ |
You are expected to read and work it out for yourself. This is, after all, the Scripting Help forum and not the Script Requests forum. _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
|