Kod: Kodu kopyalamak için üzerine çift tıklayın!
alias sondakika {
unset %haber
sockclose s4
sockopen s4 sondakika.hurriyet.com.tr 80
}
alias -l sw sockwrite -n $sockname $1-
on *:sockopen:s4: {
if (!$sockerr) {
sw GET /?sid=0 HTTP/1.1
sw Host: sondakika.hurriyet.com.tr
sw User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5
sw Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
sw Accept-Language: tr-TR,tr;q=0.8,en-us;q=0.5,en;q=0.3
sw Accept-Encoding: gzip,deflate
sw Accept-Charset: ISO-8859-9,utf-8;q=0.7,*;q=0.7
sw Connection: Close
sw $crlf
}
}
alias htmlfree {
var %x, %i = $regsub($replace($1-,,-, ,¿,DiÄŸer haberler için tıklayın…,difuzyonnnn),/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x, ,$chr(9))
return %x
}
on *:sockread:s4: {
sockread %a
if (class=”hurtextverdana”> isin %a) {
set %haber $htmlfree(%a)
var %i = 1 , %id $numtok(%haber,191)
while (%i <= $calc(%id – 1)) { var %s $gettok(%haber,%i,191) if (difuzyon isin %s) halt .msg %habernick $replace(%s,-,4-01) inc %i } } } on *:text:!haberler:#haber:set $+(%,haber,nick) $nick | sondakika | .msg %habernick 3Son dakika haberleri listeleniyor : alias haberler { unset %haberler sockclose s6 sockopen s6 sondakika.hurriyet.com.tr 80 } on *:sockopen:s6: { if (!$sockerr) { if $window(@Haberler) { clear @Haberler | window -a @Haberler } else { window -adCk0 +let @Haberler 0 0 500 270 Verdana 13 } sw GET /?sid=0 HTTP/1.1 sw Host: sondakika.hurriyet.com.tr sw User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5 sw Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 sw Accept-Language: tr-TR,tr;q=0.8,en-us;q=0.5,en;q=0.3 sw Accept-Encoding: gzip,deflate sw Accept-Charset: ISO-8859-9,utf-8;q=0.7,*;q=0.7 sw Connection: Close sw $crlf } } on *:sockread:s6: { sockread %cenk if (class=”hurtextverdana”> isin %cenk) {
set %haberler $htmlfree(%cenk)
var %iks = 1 , %ide $numtok(%haberler,191)
while (%iks <= $calc(%ide – 1)) {
var %srdr $gettok(%haberler,%iks,191)
if (difuzyon isin %srdr) { halt }
aline 7 @Haberler $replace(%srdr,-,4-10)
inc %iks
}
}
}