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 

need help on youtube.tcl

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
dmartani
Voice


Joined: 20 Jul 2008
Posts: 1

PostPosted: Sun Jul 20, 2008 10:18 pm    Post subject: need help on youtube.tcl Reply with quote

Hello..
i need help with youtube.tcl i was try to edit but didnt work. i want change this tcl to work or can use with public msg on chan / not with private (search and result)

### YouTube Searching script. v0.1
### Made by Mookie
### Contact me at Efnet for more information or suggestions
### V0.2 because of youtube source code changement.

package require http

### Settings ###

set youtube(timeout) "600000" ;# Youtube geturl timeout. (better leave this default)
set youtube(results) "1" ;# Results to display
set youtube(trigger) "!youtube" ;# Search trigger

#########################################################
## Don't edit below unless you know what you're doing. ##
#########################################################


bind msg - $::youtube(trigger) youtube

proc youtube {nick uhost hand arg} {
global youtube
if {$arg == ""} { putmsg $nick "Please use: $::youtube(trigger) KEYWORD"; return }
set form [http::formatQuery search_query $arg search search]
set tok [http::geturl http://youtube.com/results?$form -timeout $::youtube(timeout)]
set data [http::data $tok]
regsub -all {<b>|</b>} $data {} data
http::cleanup $tok
set a "0"
while {[regexp -- {<a href=\"/watch\?v=(.*?)\">(.*)$} $data -> number data]} {
if {$a == $::youtube(results)} { break }
regexp -- {<img src=".*?" class=".*?" title="(.+?)" alt="video">} $data -> title
putmsg $nick "\[Title: $title Link:http://youtube.com/watch?v=$number Description:$title\]"
incr a
}
if {![info exists title]} { putmsg $nick "tidak ditemukan untuk pencarian $arg silahkan langsung ke www.youtube.com saja hehe" }
}

Thanks for your help if any..
Back to top
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Mon Jul 21, 2008 12:15 am    Post subject: Reply with quote

Contact the author (on Efnet) as indicated in the script header.
_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests 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