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 

pls help youtube download

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
Sincan2
Voice


Joined: 15 Jan 2014
Posts: 3

PostPosted: Wed Jan 15, 2014 5:38 pm    Post subject: pls help youtube download Reply with quote

I have code

Code:

bind pub -|- !qe3 yotube

proc yotube {nick uhost hand chan text} {
   set yotube [exec /home/sincan2/qe3.sh]
   foreach line [split $youtube \n] {
      puthelp "PRIVMSG $chan :$line"
   }
}


Code:

sincan2@sincan2-sg-develop:~$ ./qe3.sh http://www.youtube.com/watch?v=ryV-Iwd1DTc
donwload by Sincan2 2014
[youtube] Setting language
[youtube] ryV-Iwd1DTc: Downloading webpage
[youtube] ryV-Iwd1DTc: Downloading video info webpage
[youtube] ryV-Iwd1DTc: Extracting video information
[download] Destination: Raisa - Mantan Terindah-ryV-Iwd1DTc.mp4
[download] 100% of 4.48MiB in 00:00
[avconv] Destination: Raisa - Mantan Terindah-ryV-Iwd1DTc.mp3
Deleting original file Raisa - Mantan Terindah-ryV-Iwd1DTc.mp4 (pass -k to keep)
sincan2@sincan2-sg-develop:~$


form MIRC
Quote:

<@Sincan2> !qe3 http://www.youtube.com/watch?v=ryV-Iwd1DTc

error TCL

[05:32:25] Tcl error [yotube]: donwload by Sincan2 2014
Usage: youtube-dl [options] url [url...]

youtube-dl: error: you must provide at least one URL


help me

many thanks
Back to top
View user's profile Send private message
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Thu Jan 16, 2014 1:42 am    Post subject: Reply with quote

The error is self explanatory, shouldn't you provide a link to the qe3.sh to check?

Hint:
Code:

set youtube [exec /home/sincan2/qe3.sh [split $text]]

Edit: fixed typo.
_________________
Once the game is over, the king and the pawn go back in the same box.


Last edited by caesar on Wed Jan 22, 2014 2:33 am; edited 1 time in total
Back to top
View user's profile Send private message
Sincan2
Voice


Joined: 15 Jan 2014
Posts: 3

PostPosted: Thu Jan 16, 2014 9:53 am    Post subject: Reply with quote

qe3.sh <<< bot error bash script this run normaly

Code:

sincan2@sincan2-sg-develop:~/bot$ cat scripts/4.tcl
bind pub -|- !qe3 yotube

proc yotube {nick uhost hand chan text} {
         set yotube [exec /home/sincan2/qe3.sh [split $text]]
   foreach line [split $youtube \n] {
      puthelp "PRIVMSG $chan :$line"
   }
}
sincan2@sincan2-sg-develop:~/bot$

<@Sincan2> !qe3 http://www.youtube.com/watch?v=abwCVwviBdU
Code:

[21:59:17] Tcl error [yotube]: can't read "youtube": no such variable

This scripts qe3.sh
Code:

sincan2@sincan2-sg-develop:~$ cat qe3.sh
#!/bin/bash
echo "donwload by Sincan2 2014"
#url $1
sleep 1
youtube-dl $1 -t -x --audio-format "mp3"
mv *.mp3 /home/sincan2/mp3
chown -R sincan2:sincan2 /home/sincan2/mp3
exit 0
}
sincan2@sincan2-sg-develop:~$
Back to top
View user's profile Send private message
Sincan2
Voice


Joined: 15 Jan 2014
Posts: 3

PostPosted: Tue Jan 21, 2014 2:35 pm    Post subject: Reply with quote

Help Me........
Back to top
View user's profile Send private message
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Wed Jan 22, 2014 2:32 am    Post subject: Reply with quote

There's a typo in this line:
Code:

set yotube [exec /home/sincan2/qe3.sh [split $text]]

It's wrong in the first post too. Hint: yotube.
_________________
Once the game is over, the king and the pawn go back in the same box.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help 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