Any clues?
-- Pete --
--
"I love the smell of scorched lame duck in the morning..."
============================================================================
The address in the header is a Spam Bucket -- don't bother replying to it...
(If you do need to email, replace the account name with my true name.)
Have you tried something like VideoDownloaderą? There seem to be a
number of other add-ons for that purpose, too:
https://addons.mozilla.org/en-US/firefox/search?q=video+downloader&status=4
ą https://addons.mozilla.org/en-US/firefox/addon/2390
--
"Aparaattia haittaa rapa."
--Alivaltiosihteeri
> Pete <neve...@jwgibbs.cchem.berkeley.edu> wrote:
>>
>> Just wondering if anyone has found a way to view YouTube videos on BeOS.
>>
>> Any clues?
>
> Have you tried something like VideoDownloaderą? There seem to be a
I'm not sure those will work in BeOS, depends if they are binary addons
or only html/javascript code.
It's easy to get an url to download the .FLV video from the web page.
See the source, find "player2" and use that url on the same host after
replacing "player2.swf" by "get_video".
The following script should do that (run it and paste urls of the web page).
##################### begin youtube.sh
#!/bin/sh
YU="http://youtube.com"
doread=1
function getflv() {
u="$1"
tmp="/tmp/youtube.$$.$(date +%s.%N).$RANDOM"
wget -O "$tmp" "$u"
ttl="$(grep '<meta name="title"' <"$tmp" | sed 's/.*content=\"//;s/">//')"
flv="$(tr '"' '\n' <"$tmp" | grep player2 | sed 's/player2.swf/get_video/')"
if [ -n "$flv" ]; then
wget -O "Youtube - $ttl.flv" "${YU}${flv}"
fi
}
while [ -n "$1" ]; do
doread=0
getflv "$1"
shift
done
[ $doread = 0 ] && exit 0
while read u; do
getflv "$u"
done
##################### end youtube.sh
François.
Thanks. [and sorry for the somewhat slow response...] It actually looks
as if I could just use videodownloader.net -- except that I haven't been
able to get any response from that site today!
I'll take a look at some of the other options.
*This* is I think what I was looking for! I'll give it a try. Thanks!
Success! -- or at least partial... For some reason the second wget
barfs on a '303' ("Other URI") error, and I can't see any way to make
it proceed. (Tried it on both BeOS and Linux with the same result).
[Wonder if youtube is getting cute...?]
However, I just replaced the wget call in the script with one to
NetPositive, and it downloads fine!
Thanks,
> In article <f2vn1s$abv$1...@jwgibbs.CChem.Berkeley.EDU>,
> Pete <neve...@jwgibbs.cchem.berkeley.edu> wrote:
>>In article <iralmz...@free.fr>, Francois Revol <re...@free.fr> wrote:
>>>
>>>It's easy to get an url to download the .FLV video from the web page.
>>>See the source, find "player2" and use that url on the same host after
>>>replacing "player2.swf" by "get_video".
>>>
>>>The following script should do that (run it and paste urls of the web page).
>>> [snip]
>>
>>*This* is I think what I was looking for! I'll give it a try. Thanks!
>
> Success! -- or at least partial... For some reason the second wget
> barfs on a '303' ("Other URI") error, and I can't see any way to make
> it proceed. (Tried it on both BeOS and Linux with the same result).
> [Wonder if youtube is getting cute...?]
>
> However, I just replaced the wget call in the script with one to
> NetPositive, and it downloads fine!
It seems youtube changed their stuff and don't embed the flv url in the page anymore :-(
That plain sux.
They have no reason to fear piracy, it's not like the videos aren't available to anyone (who has flash) :)
François.
In article <8x60xw...@free.fr>,
=?iso-8859-1?Q?Fran=E7ois?= Revol <re...@free.fr> wrote:
>
>It seems youtube changed their stuff and don't embed the flv url in the page anymore :-(
>
>That plain sux.
>They have no reason to fear piracy, it's not like the videos aren't available to anyone (who has flash) :)
>
Yeah, I noticed that! Couldn't let them do that (;-/), so I whipped
up a Ruby script to handle the new scheme. (You do have [my port of]
Ruby, don't you? See BeBits...)
If it's of interest, here's the script:
#! /bin/env ruby
require "net/http"
require "uri"
class Tube < String
def base
@base = scan(%r['/player2.swf(.*)'])
@base
end
def args
s = scan(%r[swfArgs *= *(\{.*\})])
@args = s[0][0][1...-2].gsub(":'","=").gsub("',","&")
@args
end
def initialize(s)
super(s)
base; args
end
def url
"http://youtube.com/get_video?"+@args
end
end
while true
body = nil
begin
print "URL: "; urlf = $stdin.gets
exit if urlf.chop! == ""
print "YouTube Page: #{urlf} -- return code="
resp = Net::HTTP.get_response(URI.parse(urlf))
puts resp.code
next if resp.code != "200" # code is a string!
body = Tube.new(resp.body)
print "using video URL: #{body.url}\n"
%x{/Media/home/Downloads/vlc-0.8.6/vlc \"#{body.url}\"}
rescue => exc
print "Error -- (probably) bad URL -- ", exc, "\n"
end
end
(Presumably will work on non-BeOS systems too.)