| View previous topic :: View next topic |
| Author |
Message |
garry
Joined: 19 Apr 2005 Posts: 2198 Location: switzerland
|
|
| Back to top |
|
 |
user
Joined: 05 Oct 2006 Posts: 476
|
Posted: Mon Dec 18, 2006 11:50 pm Post subject: |
|
|
thank you for this
but I really wanted to
1)autosave all youtube videos I visit (even if I dont want for them to download completely)
2)autorename them
thanks |
|
| Back to top |
|
 |
BETLOG
Joined: 27 Nov 2006 Posts: 222 Location: Queensland, Australia
|
Posted: Tue Dec 19, 2006 4:02 am Post subject: |
|
|
[edit] move along, nothing to see here, move along.
Last edited by BETLOG on Wed Jan 24, 2007 7:51 am; edited 1 time in total |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Mon Jan 01, 2007 10:23 pm Post subject: |
|
|
| Quote: | | Code: | #!/bin/sh
# Grab a video (in nasty Flash video format) from youtube.com.
# This is based on what http://keepvid.com/ does (at least, I assume it isn't
# doing anything smarter than this).
TF=/tmp/ytg.$$
trap "rm -f $TF" 0
url="$1"
if [ "$url" = "" ] ; then
echo "Usage: youtubeget http://www.youtube.com/watch?..."
exit 1
fi
v=`echo "$url" | sed 's,^.*v=\([^&]*\).*,\1,'`
agent="Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041219"
curl -A "$agent" "$url" >$TF
t=`grep '&t=' $TF | head -1 | sed 's,.*&t=\([^&"]*\)[&"].*,\1,'`
l=`grep '&l=' $TF | head -1 | sed 's,.*&l=\([^&"]*\)[&"].*,\1,'`
out="youtube-$v.flv"
echo "Downloading ID $v to $out..."
wget -O "$out" --referer "$url" -U "$agent" "http://www.youtube.com/get_video?video_id=$v&l=$l&t=$t" |
[Took it from here] | Might give an idea how to get something less Gui related with AHK. Good luck.  |
|
| Back to top |
|
 |
polyethene
Joined: 11 Aug 2004 Posts: 5244 Location: UK
|
Posted: Tue Jan 02, 2007 12:01 am Post subject: |
|
|
Nice find BoBo, here's the AHK version: | Code: | tf = %A_Temp%\ytg
url = http://www.youtube.com/watch?v=7ss41lkJFZc
RegExMatch(url, "v=(\w+)", v)
UrlDownloadToFile, %url%, %tf%
FileRead, tf, %tf%
s := RegExMatch(tf, "&t=(.+?)&", t)
RegExMatch(tf, "&l=(.+?)&", l, s - 25)
FileSelectFile, file, S18
If file
UrlDownloadToFile, http://www.youtube.com/get_video?video_id=%v1%&l=%l1%&t=%t1%, %file% |
_________________ GitHub • Scripts • IronAHK • Contact by email not private message. |
|
| Back to top |
|
 |
garry
Joined: 19 Apr 2005 Posts: 2198 Location: switzerland
|
Posted: Tue Jan 02, 2007 7:53 pm Post subject: |
|
|
thank you all
what happens here ?
I'll never understand RegEx ...
can you optimize this ? ( automatically rename )
thank you again
(moved to first position)
Last edited by garry on Wed Jan 03, 2007 2:26 pm; edited 1 time in total |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Tue Jan 02, 2007 8:37 pm Post subject: |
|
|
| Quote: | | automatically rename | Replace the FileSelectFile section with a FileMove statement. Done. |
|
| Back to top |
|
 |
garry
Joined: 19 Apr 2005 Posts: 2198 Location: switzerland
|
Posted: Tue Jan 02, 2007 8:57 pm Post subject: |
|
|
script above works fine with automatically rename
but mine part is not so nice written ...  |
|
| Back to top |
|
 |
garry
Joined: 19 Apr 2005 Posts: 2198 Location: switzerland
|
Posted: Tue Jan 02, 2007 11:13 pm Post subject: |
|
|
| moved to first position |
|
| Back to top |
|
 |
garry
Joined: 19 Apr 2005 Posts: 2198 Location: switzerland
|
Posted: Wed Jan 03, 2007 7:40 pm Post subject: |
|
|
| modified , while looking video, can record also audio to MP3 with mixmp3.exe |
|
| Back to top |
|
 |
garry
Joined: 19 Apr 2005 Posts: 2198 Location: switzerland
|
Posted: Fri Jan 05, 2007 3:55 pm Post subject: |
|
|
| Titan modified RegEx code |
|
| Back to top |
|
 |
ManilaGurL
Joined: 24 Jan 2007 Posts: 2
|
Posted: Wed Jan 24, 2007 6:56 am Post subject: |
|
|
| Hmm how do u make this thing work? Please help I badly need to save vids from youtube and record the audio too.. |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Wed Jan 24, 2007 8:35 am Post subject: |
|
|
| Quote: | | Please help I badly need to save vids from youtube and record the audio too.. | Run the script. If you don't know how, check the QuickStartTutorial. Good luck. |
|
| Back to top |
|
 |
ManilaGurL
Joined: 24 Jan 2007 Posts: 2
|
Posted: Wed Jan 24, 2007 9:31 am Post subject: |
|
|
Script? I don't see any script here or I just don't know it. Thanks anyway.  |
|
| Back to top |
|
 |
Steve Wonder Guest
|
Posted: Wed Jan 24, 2007 11:58 am Post subject: |
|
|
| Quote: | | I don't see any script here | Me too!!! |
|
| Back to top |
|
 |
|