Tekil Mesaj gösterimi
Alt 31 Temmuz 2017, 20:23   #3
Çevrimiçi
GhostLy Doğrulanmış Üye
Kullanıcıların profil bilgileri misafirlere kapatılmıştır.
IF Ticaret Sayısı: (0)
IF Ticaret Yüzdesi:(%)
Cevap: Radyo Botu - !ara Entegreli




Ben sizinle böyle bir tcl paylaşayım fakat çalışıyor mu bilmiyorum.. inceleyin bakın yardımcı olmaya çalışırız.
Kod:   Kodu kopyalamak için üzerine çift tıklayın!
############################################################################## # youtube.tcl by SaW # ############################################################################## # Normal Kullanım : # # !youtube <aranacak-kelimeler> # # Örnek : !youtube komik videolar # # # # Parametreli Kullanım : # # !youtube <parametre> <aranacak-kelimeler> # # # # Mevcut Parametreler: # # -nN : Kaç tane sonucun görüntüleneceğini belirler. # # Örnek : !youtube -n8 komik videolar # # # # -tN : Arama sonuçlarının neye göre sıralacağını belirler : # # N=1 : Normal Sıralama, N=2 : izlenme sayısına göre # # N=3 : Rating sıralaması, N=4 : Video ekleme tarihine göre sıralar. # # Örnek : !youtube -t2 komik videolar # ############################################################################## # 16 Aralık 2008 Salı # # iletişim:
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
# ############################################################################## # ## Komutun çalışmasını istediğiniz kanalları aralarına boşluk koyarak belirtiniz. # set you(kanal) "#kanal1 #kanal2 #kanal3" # ## Arama sonrasında kaç sonucunun ekrana yansıtılacağını seçiniz. # set you(maxc) 5 # ## Sonuçların neye göre sıralanacağını seçiniz. ## 1= Normal sıralama ## 2= İzlenme sayısına göre ## 3= Rating oranına göre ## 4= Eklenme tarihine göre # set you(sertype) 1 ############################################################################### # BURADAN SONRASINA DOKUNMAYINIZ!!!! # ############################################################################### bind pub - !youtube ytb if {$you(sertype) == 1} { set you(stype) "" } if {$you(sertype) == 1} { set you(stype) "&search_sort=video_view_count" } if {$you(sertype) == 1} { set you(stype) "&search_sort=video_avg_rating" } if {$you(sertype) == 1} { set you(stype) "&search_sort=video_date_uploaded" } bind pub - !you ytb proc ytb {nick uhost hand chan text} { global you if {[lsearch -exact $you(kanal) $chan] == -1} {return 0} set searchtype $you(stype) set text [split [string trim $text]] if {$text == ""} {putquick "PRIVMSG $chan :\002Aranacak kelimeyi girmediniz.";return} if {[llength $text] == 1 && [string match -nocase "$text" help]} { putquick "privmsg $chan :\002You\0030,4Tube\002\003 Arama şekilleri" putquick "privmsg $chan :\0032Normal arama :\003 !youtube <aranacak-kelimeler>" putquick "privmsg $chan :\0032Parametreli arama :\003 !youtube <parametre> <aranacak-kelimeler>" putquick "privmsg $chan :\002Mevcut Parametreler:" putquick "privmsg $chan :\0032-nN :\003 Kaç tane sonucun görüntüleneceğini belirler. Örnek : !youtube -n8 komik videolar" putquick "privmsg $chan :\0032-tN :\003 Arama sonuçlarının neye göre sıralanacağını belirler :" putquick "privmsg $chan :N=1 : Normal Sıralama, N=2 : izlenme sayısına göre, N=3 : Rating sıralaması, N=4 : Video ekleme tarihine göre sıralar." putquick "privmsg $chan :Örnek : !youtube -t2 komik videolar" return 0 } if {[llength $text] >= 2 && [string match -nocase "-n" [string range [lindex $text 0] 0 1]] && [string length [lindex $text 0]] > 2 && [string length [lindex $text 0]] <= 4 && [string is integer [string range [lindex $text 0] 2 end]] == 1} { set cmax [string range [lindex $text 0] 2 end] ; set text [lrange $text 1 end] } else { set cmax $you(maxc) } if {[llength $text] >= 2 && [string match -nocase "-t" [string range [lindex $text 0] 0 1]] && [string length [lindex $text 0]] == 3 && [string length [lindex $text 0]] <= 4 && [string is integer [string range [lindex $text 0] 2 end]] == 1} { if {[string index [lindex $text 0] 2] == 1} { set searchtype "" ; set text [lrange $text 1 end] } elseif {[string index [lindex $text 0] 2] == 2} { set searchtype "&search_sort=video_view_count" ; set text [lrange $text 1 end] } elseif {[string index [lindex $text 0] 2] == 3} { set searchtype "&search_sort=video_avg_rating" ; set text [lrange $text 1 end] } elseif {[string index [lindex $text 0] 2] == 4} { set searchtype "&search_sort=video_date_uploaded" ; set text [lrange $text 1 end] } else { set searchtype $you(stype) ; set text [lrange $text 1 end] } } if {[llength $text] > 1} {set text [join [split $text " "] +]} set text [string tolower $text 0 end] putlog "$text" if {$searchtype == ""} { set yousite "[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...]" } elseif {$searchtype != ""} { set yousite "[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...]" } set sayfa "" catch {set sayfa [::http::geturl $yousite -timeout 3000]} error if {[string match -nocase "*couldn't open socket*" $error]} { putquick "PRIVMSG $chan :Hata: Şuan siteye bağlanılamıyor.. Daha Sonra Tekrar Deneyiniz.." ::http::cleanup $sayfa return } if { [::http::status $sayfa] == "*timeout*" } { putquick "PRIVMSG $chan :Hata: YouTube'a bağlantı zaman aşımına uğradı.." ::http::cleanup $sayfa return } set html [::http::data $sayfa] ::http::cleanup $sayfa you:temiz $html set count 1 putquick "privmsg $chan :\002You\0030,4Tube\002\003 Sonuçları" foreach y [split $html \n] { if {[string match -nocase "*id=\"video-url-*" $y] && $count <= $cmax} { regexp -- {id=\"video-url-(.*?)\".href=\"/watch.+<img.title=\"(.*?)\"} $y - shr title } if {[info exists shr]} { if {[string match -nocase "*video-run-time-$shr*" $y] && $count <= $cmax} { regexp -- {video-run-time-...........\">(.*?)<} $y - uzn } } if {[info exists shr] && [info exists uzn]} { if {[string match -nocase "*video-date-added*" $y] && $count <= $cmax} { regexp -- {video-date-added\">(.*?)<} $y - added } } if {[info exists shr] && [info exists uzn] && [info exists added]} { if {[string match -nocase "*video-view-count*" $y] && $count <= $cmax} { regexp -- {video-view-count\">(.*?)views<} $y - view putquick "privmsg $chan :$count -\002\0035 $title" putquick "privmsg $chan :Eklenme zamanı:\0036 $added \003izlenme:\0036 $view \003Uzunluk:\0036 $uzn" putquick "privmsg $chan :\00314
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
putquick "privmsg $chan : " incr count } } } if {$count == 1} { putquick "privmsg $chan :Aradığınız kelimelerle ilgili hiç video bulunamadı" } } proc you:temiz {html} { regsub -all {\t} $html {} html regsub -all {&nbsp;} $html {} html regsub -all {&amp;} $html {&} html regsub -all {\u015E} $html {Ş} html regsub -all {\u015F} $html {ş} html regsub -all {\u011F} $html {ğ} html regsub -all {\u011E} $html {Ğ} html regsub -all {\u0131} $html {ı} html regsub -all {\u0130} $html {İ} html regsub -all {Ç} $html {C} html return $html } putlog "youtube.tcl By SaW Başarıyla Yüklendi"



--IRCForumlari.NET ; Flood Engellendi -->-> Yeni yazılan mesaj 20:23 -->-> Daha önceki mesaj 19:51 --

Birde bu tcl var deneyin..

Kod:   Kodu kopyalamak için üzerine çift tıklayın!
bind pubm - "**************" tubetitle proc tubetitle {nick host hand chan arg} { if {$nick ne $::botnick} { set ::like "" set saat "" catch { exec curl -v [stripcodes bcruag $arg] } tubedata set tube [string map -nocase {"," "\n"} $tubedata] foreach dataa [split $tube \n] { if {[string match -nocase "*\"length_seconds\":*" $dataa]} { set sayi [lindex [string map {"\"" " "} $dataa] end] if { [string length $sayi] < 4 } { set dakika [expr int($sayi / 60)] set dksn [expr $sayi - [expr $dakika * 60]] } else { set saat [string index [expr [expr $sayi / 60] / 60] 0] set dksn [string range [expr [expr $sayi / 60] - 60] 0 1] } if { [set ra [string length $dksn]] >= 2 } { if { $saat == "" } { set ::sure "$dakika:$dksn" } else { if { [string range $dksn 0 1] < 60 } { set ::sure "$saat:[string range $dksn 0 1]:00" } else { if {[expr [string range $dksn 0 1] - 60] <= 9} { set ::sure "$saat:0[expr [string range $dksn 0 1] - 60]:00" } else { set ::sure "$saat:[expr [string range $dksn 0 1] - 60]:00" } } } } else { set ::sure "$dakika:0$dksn" } } if {[string match "*-like-button-unclicked*" $dataa]} { set ::like [lindex [string map {"</span" "" "</button" "" "\">" " " ">" ""} $dataa] end] } if {[string match "*-dislike-button-unclicked*" $dataa]} { set ::dislike [lindex [string map {"</span" "" "</button" "" "\">" " " ">" ""} $dataa] end] } } if {[string match "" $::like]} { return 0 } regexp -- {<meta itemprop=\"name\" content=\"(.*?)\">} $tubedata - title # regexp -- {<meta itemprop=\"interactionCount\" content=\"(.*?)\">} $tubedata - view regexp -- {<meta itemprop=\"datePublished\" content=\"(.*?)\">} $tubedata - date regexp -- {<meta itemprop=\"genre\" content=\"(.*?)\">} $tubedata - genre regexp -- {</ul></div></div></div><div id="watch8-sentiment-actions"><div id="watch7-views-info"><div class="watch-view-count">(.*?)</div>} $tubedata - count putquick "privmsg $chan :You\0030,4Tube\003 \00311,1 Title:\0030 [encoding convertto utf-8 "$title \003 \0034,4|\003 \00311,1 Time:\0030 $::sure \003"]" putquick "privmsg $chan :You\0030,4Tube\003 [entityToChar "\0037,1 Date:\0030 $date \003 \0034,4|\003 \0038,1 Genre: \0030$genre \003 \0034,4|\003 \00313,1 Views:\0030 $count \003 \0034,4|\003 \0039,1 Like:\0030 $::like \003 \0034,4|\003 \0034,1 Dislike:\0030 $::dislike \003"]" } } proc entityToChar {text {char utf-8}} { if {![string match *&* $text]} {return $text} set escapes { &nbsp; \xa0 &iexcl; \xa1 &cent; \xa2 &pound; \xa3 &curren; \xa4 &yen; \xa5 &brvbar; \xa6 &sect; \xa7 &uml; \xa8 &copy; \xa9 &ordf; \xaa &laquo; \xab &not; \xac * \xad &reg; \xae &macr; \xaf &deg; \xb0 &plusmn; \xb1 ² \xb2 ³ \xb3 &acute; \xb4 &micro; \xb5 &para; \xb6 &middot; \xb7 &cedil; \xb8 ¹ \xb9 &ordm; \xba &raquo; \xbb ¼ \xbc ½ \xbd ¾ \xbe &iquest; \xbf &Agrave; \xc0 &Aacute; \xc1 &Acirc; \xc2 &Atilde; \xc3 &Auml; \xc4 &Aring; \xc5 &AElig; \xc6 &Ccedil; \xc7 &Egrave; \xc8 &Eacute; \xc9 &Ecirc; \xca &Euml; \xcb &Igrave; \xcc &Iacute; \xcd &Icirc; \xce &Iuml; \xcf &ETH; \xd0 &Ntilde; \xd1 &Ograve; \xd2 &Oacute; \xd3 &Ocirc; \xd4 &Otilde; \xd5 &Ouml; \xd6 &times; \xd7 &Oslash; \xd8 &Ugrave; \xd9 &Uacute; \xda &Ucirc; \xdb &Uuml; \xdc &Yacute; \xdd &THORN; \xde &szlig; \xdf &agrave; \xe0 &aacute; \xe1 &acirc; \xe2 &atilde; \xe3 &auml; \xe4 &aring; \xe5 &aelig; \xe6 &ccedil; \xe7 &egrave; \xe8 &eacute; \xe9 &ecirc; \xea &euml; \xeb &igrave; \xec &iacute; \xed &icirc; \xee &iuml; \xef &eth; \xf0 &ntilde; \xf1 &ograve; \xf2 &oacute; \xf3 &ocirc; \xf4 &otilde; \xf5 &ouml; \xf6 &divide; \xf7 &oslash; \xf8 &ugrave; \xf9 &uacute; \xfa &ucirc; \xfb &uuml; \xfc &yacute; \xfd &thorn; \xfe &yuml; \xff &fnof; \u192 &Alpha; \u391 &Beta; \u392 &Gamma; \u393 &Delta; \u394 &Epsilon; \u395 &Zeta; \u396 &Eta; \u397 &Theta; \u398 &Iota; \u399 &Kappa; \u39A &Lambda; \u39B &Mu; \u39C &Nu; \u39D &Xi; \u39E &Omicron; \u39F &Pi; \u3A0 &Rho; \u3A1 &Sigma; \u3A3 &Tau; \u3A4 &Upsilon; \u3A5 &Phi; \u3A6 &Chi; \u3A7 &Psi; \u3A8 &Omega; \u3A9 &alpha; \u3B1 &beta; \u3B2 &gamma; \u3B3 &delta; \u3B4 &epsilon; \u3B5 &zeta; \u3B6 &eta; \u3B7 &theta; \u3B8 &iota; \u3B9 &kappa; \u3BA &lambda; \u3BB &mu; \u3BC &nu; \u3BD &xi; \u3BE &omicron; \u3BF &pi; \u3C0 &rho; \u3C1 &sigmaf; \u3C2 &sigma; \u3C3 &tau; \u3C4 &upsilon; \u3C5 &phi; \u3C6 &chi; \u3C7 &psi; \u3C8 &omega; \u3C9 &thetasym; \u3D1 &upsih; \u3D2 &piv; \u3D6 &bull; \u2022 &hellip; \u2026 &prime; \u2032 &Prime; \u2033 &oline; \u203E &frasl; \u2044 &weierp; \u2118 &image; \u2111 &real; \u211C &trade; \u2122 &alefsym; \u2135 &larr; \u2190 &uarr; \u2191 &rarr; \u2192 &darr; \u2193 &harr; \u2194 &crarr; \u21B5 &lArr; \u21D0 &uArr; \u21D1 &rArr; \u21D2 &dArr; \u21D3 &hArr; \u21D4 &forall; \u2200 &part; \u2202 &exist; \u2203 &empty; \u2205 &nabla; \u2207 &isin; \u2208 &notin; \u2209 &ni; \u220B &prod; \u220F &sum; \u2211 &minus; \u2212 &lowast; \u2217 &radic; \u221A &prop; \u221D &infin; \u221E &ang; \u2220 &and; \u2227 &or; \u2228 &cap; \u2229 &cup; \u222A &int; \u222B &there4; \u2234 &sim; \u223C &cong; \u2245 &asymp; \u2248 &ne; \u2260 &equiv; \u2261 &le; \u2264 &ge; \u2265 &sub; \u2282 &sup; \u2283 &nsub; \u2284 &sube; \u2286 &supe; \u2287 &oplus; \u2295 &otimes; \u2297 &perp; \u22A5 &sdot; \u22C5 &lceil; \u2308 &rceil; \u2309 &lfloor; \u230A &rfloor; \u230B &lang; \u2329 &rang; \u232A &loz; \u25CA &spades; \u2660 &clubs; \u2663 &hearts; \u2665 &diams; \u2666 &quot; \x22 &amp; \x26 &lt; \x3C &gt; \x3E O&Elig; \u152 &oelig; \u153 &Scaron; \u160 &scaron; \u161 &Yuml; \u178 &circ; \u2C6 &tilde; \u2DC &ensp; \u2002 &emsp; \u2003 &thinsp; \u2009 &zwnj; \u200C &zwj; \u200D &lrm; \u200E &rlm; \u200F &ndash; \u2013 &mdash; \u2014 &lsquo; \u2018 &rsquo; \u2019 &sbquo; \u201A &ldquo; \u201C &rdquo; \u201D &bdquo; \u201E &dagger; \u2020 &Dagger; \u2021 &permil; \u2030 &lsaquo; \u2039 &rsaquo; \u203A &euro; \u20AC &apos; \u0027 &lrm; "" &rlm; "" ? "" * "" * "" }; set text [string map[list "\]" "\\\]" "\[" "\\\[" "\$" "\\\$" "\\" "\\\\"] [string map $escapes $text]] regsub -all -- {&#([[:digit:]]{1,5});} $text {[format %c [string trimleft "\1" "0"]]} text regsub -all -- {&#x([[:xdigit:]]{1,4});} $text {[format %c [scan "\1" %x]]} text return [subst "$text"] } putlog "rascoLn - youtube title.tcl"


__________________
SANAL IRC Network - irc.sanal.org
 
Alıntı ile Cevapla

IRCForumlari.NET Reklamlar
sohbet odaları sohbet bizimmekan sohbet odaları