egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Live ticker bot

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
FcLan
Halfop


Joined: 30 Sep 2005
Posts: 64
Location: Poland

PostPosted: Thu Dec 29, 2005 11:11 am    Post subject: Live ticker bot Reply with quote

I`m working for live ticker bot with eurosport.com site, but, bot sends minutes from bottom site, but the oldest commentary, I don`t want to use http where geturl is a command i want to use a socket but how change it..

Code:
set url "www.eurosport.com"

 proc get_live {nick uhost handle channel text} {
 global url
 set sock [socket $url 80]
 fconfigure $sock -buffering line -buffersize 1000
 puts $sock "GET /home/pages/v4/l0/s22/e10028/live_lng0_spo22_evt10028_mtc112276.shtml HTTP/1.0"
 puts $sock "Host: www.eurosport.com"
 puts $sock ""
 puts $sock "User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; WindowsNT 5.0)"
 flush $sock

 while {![eof $sock]} {
 gets $sock body
 regexp -all {/><font color="FF0000"><b>(.*?)</b></font>} $body _ minute
regexp -all {(.*?)<br /><br /><b>} $body _ com

}

if {[eof $sock]} { close $sock }

 regsub -all {(<.+?>)} $minute"" minute
 regsub -all {(<.+?>)} $com"" com
 

 puthelp "PRIVMSG $channel :[lindex $minute] [lindex $com]"

}

bind pub - !live get_live



Code:
[16:06] <Fclan> !live
[16:06] <bot`> 23:12     Half time in Highbury...4-0 for Arsenal after an astonishing display from the Gunners..
.

it should be:
Code:
fclan: !live
bot: 23:12 Thanks for joining us today for our coverage of the Premiership. Please come back again on Saturday for another nine games as the Premiership continues it's Christmas programme starting at 13:45cet here on eurosport.com


Please help, must be way to get info from top !
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber