Mise en forme de code: pensez à utiliser les balises [ tcl ] et [ /tcl ] (sans les espaces bien sûr) autour de vos codes tcl afin d'avoir un meilleur rendu et une coloration syntaxique. x


erreur script youtube
#1
voilà,j'ai trouvé ce script, mais y'a un beug

commande : !youtube un titre et ca renvoi le lien youtube

le script :


tcl
### YouTube Searching script. v0.1
### Made by Mookie		
### Contact me at Efnet for more information or suggestions
### V0.3 Fixed + added spam protection
 
package require http
 
### Settings ###
 
set youtube(timeout) "600000"		;# Youtube geturl timeout. (better leave this default)
set youtube(results) "5"		;# Results to display
set youtube(trigger) "!youtube"		;# Search trigger
set youtube(spam) "10"			;# Spam protection in seconds
 
#########################################################
## Don't edit below unless you know what you're doing. ##
#########################################################
 
 
bind pub - $::youtube(trigger) youtube
 
proc youtube {nick uhost hand chan arg} {
	if {[info exists ::checks($nick)] && ([clock seconds] - $::checks($nick)) < $::youtube(spam)} { sendmsg $chan "Fk off spammer.."; return }
	set ::checks($nick) [clock seconds]
	if {$arg == ""} { putmsg $nick "Please use: $::youtube(trigger) KEYWORD"; return }
	set form [http::formatQuery search_query $arg search search]
	set tok [http::geturl http://www.youtube.com/results?search_type=&$form -timeout $::youtube(timeout)]
	set data [http::data $tok]
	http::cleanup $tok
	set a "0"
	while {[regexp -- {<a id="video-short-title.*?" href="(.*?)"  title="(.*?)" rel="nofollow">(.*)$} $data -> number title data]} {
		if {$a == $::youtube(results)} { break }
		sendmsg $chan "\[Title: $title Link:http://youtube.com$number\]"
		incr a
	}
	if {![info exists title]} { sendmsg $chan "\002Error:\002 Nothing found for '$arg'" }
}
proc "sendmsg" { target message } {
	sputraw "PRIVMSG [string tolower $target] :$message"
}
proc "sputraw" { text } {
	set text [string trim $text]
	putdccraw 0 [string length $text\n] $text\n
}



En Erreur , j'ai :

Quote:.set errorInfo
[08:16:46] ‹YouTube› [08:17] #Zyrte# set errorInfo
[08:16:47] ‹YouTube› Currently: can't read "state(after)": no such element in array
[08:16:47] ‹YouTube› Currently: while executing
[08:16:47] ‹YouTube› Currently: "after cancel $state(after)"


merci d'avance


Messages In This Thread
erreur script youtube - by zyrte - 25/07/2011, 08:21
RE: erreur script youtube - by fedora - 25/07/2011, 08:45
RE: erreur script youtube - by zyrte - 25/07/2011, 09:31
RE: erreur script youtube - by djkenny - 25/07/2011, 09:40
RE: erreur script youtube - by zyrte - 25/07/2011, 09:46
RE: erreur script youtube - by zyrte - 25/07/2011, 09:50
RE: erreur script youtube - by djkenny - 25/07/2011, 10:00
RE: erreur script youtube - by djkenny - 25/07/2011, 11:27
RE: erreur script youtube - by zyrte - 11/01/2012, 16:31
RE: erreur script youtube - by CrazyCat - 11/01/2012, 17:35
RE: erreur script youtube - by zyrte - 11/01/2012, 18:56
RE: erreur script youtube - by CrazyCat - 01/02/2012, 16:59
RE: erreur script youtube - by zyrte - 04/02/2012, 07:38
RE: erreur script youtube - by zyrte - 17/11/2012, 15:44
RE: erreur script youtube - by CrazyCat - 17/11/2012, 19:07
RE: erreur script youtube - by zyrte - 17/11/2012, 19:44
RE: erreur script youtube - by CrazyCat - 18/11/2012, 11:31
[Script] Youtube Search - by zyrte - 18/11/2012, 07:03

Possibly Related Threads…
Thread Author Replies Views Last Post
  [Résolu]Youtube-link bouba89 9 1,007 27/05/2021, 16:41
Last Post: ZarTek
  Youtube pheeric 19 7,699 17/08/2020, 22:34
Last Post: pheeric
  [Résolu] Youtube pheeric 1 1,864 11/01/2020, 00:10
Last Post: pheeric
Smile Youtube.tcl par aliasangelius pheeric 8 6,754 02/01/2018, 17:25
Last Post: cestlemien
  [Résolu] Youtube tcl (Zurl.tcl) ne fonctionne plus Krypte 23 14,357 28/04/2017, 18:22
Last Post: Alucard`68
  youtube script zyrte 31 24,440 18/01/2016, 17:17
Last Post: MisterS
  erreur script et connection bdd zorrax 2 4,389 06/11/2010, 20:38
Last Post: zorrax

Forum Jump:


Users browsing this thread: 1 Guest(s)