KivanC | 22 Kasım 2014 23:13 | !youtube link - !youtube şarkı ismi Kodeyi Çalıştıramadım bakabilirmisiniz. Kod:
on *:text:!youtube*:#kanal: {
set %ychan $chan
youtube $2-
}
alias youtube {
unset %N %y %s %title %added %user %views %url %half %full %length %half2 %full2 %rating %rating2
set %y $iif(%ychan,.msg $v1,echo -a)
if (!$1) {
%y Syntax: $iif(%ychan,!,/) $+ YouTube [search criteria]
halt
}
if ($sock(youtube)) {
%y Lütfen Bekleyin Şuanda Arıyor.
halt
}
set %s $replace($$1-,$chr(32),+)
$iif(%ychan,.describe $v1 Aranıyor,echo -a Searching) Lütfen Bekleyin Sözcük Aranıyor Aranilan Sözcük $qt($replace(%s,+,$chr(32))) $+ ...
sockopen youtube Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir. 80
}
on *:SOCKOPEN:youtube: {
sockwrite -nt $sockname GET /results?search_query= $+ %s HTTP/1.1
sockwrite -nt $sockname Host: Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir. sockwrite -nt $sockname $crlf
}
on *:SOCKREAD:youtube: {
if ($sockerr) {
%y Socket Error: $sockerr
sockclose $sockname
unset %title %added %user %views %url %half %full %length %half2 %full2 %rating %rating2 %ychan %N
}
else {
var %x
sockread %x
if (*No videos found* iswm %x) {
%y Aranılan Sözcük bulunamadi $replace($qt(%s),+,$chr(32)) Lütfen Yazdığınız Sözcügü Kontrol Edin
sockclose $sockname
}
if (*/watch?v=* iswm %x) set %url Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir. if (*alt="video"* iswm %x) set %title $gettok(%x,6,34)
if (*added:* iswm %x && *grayText* iswm %x) {
set %added $remove($gettok(%x,3,62),<br/)
if (%N == 2) noop %added
}
if (*from:* iswm %x) set %user $gettok($gettok(%x,4,47),1,34)
if (*views:* iswm %x) {
set %views $remove($gettok(%x,3,62),<br/)
}
if (*rating icn* iswm %x) {
if (%rating) {
set %full2 $count(%x,full)
set %half2 $count(%x,full)
set %rating2 $iif(!%half2,$iif(%full2,$v1,0),$iif(!%full2,0.5,%full2 $+ .5))
}
else {
set %full $count(%x,full)
set %half $count(%x,half)
set %rating $iif(!%half,$iif(%full,$v1,0),$iif(!%full,0.5,%full $+ .5))
}
}
if (*runtime* iswm %x) {
set %length $remove($htmlfree(%x),$chr(9))
inc %N
%y • Title: $htmlfree(%title) Eklendi: %added User: $htmlfree(%user) Length: %length Views: %views Rating: $calc(%rating + %rating2) $+ /5 URL: %url
unset %title %added %user %views %url %half %full %length %half2 %full2 %rating %rating2 %ychan
if (%N == 3) {
sockclose $sockname
unset %N
}
}
}
}
alias htmlfree {
var %a,%b
%b = $regsub($1,/[^<]*>|<[^>]*>|<[^>]*/g,$chr(32),%a)
return $remove($replace(%a,",",>,>,<,<,&,&),Â)
} |