Forum > Networking and Web Programming
Youtube Downloader in Pascal
tjpren:
Hello Forum,
I was wondering if anyone had success writing a youtube download app.
I've written a little app using synapse, that can download a variety of files - even flv's - from a web server, but when I try to download a link from Youtube, my file is empty.
I've looked over some source code that was in a Delphi package and a python app, and think that the issue is in the header info?
Any thoughts.
--- Code: ---procedure TForm1.Button1Click(Sender: TObject);
var
fs : TFileStream;
begin
fs := TFileStream.Create('C:\Download\Youtube', fmOpenWrite or fmCreate);
try
HttpGetBinary('http://192.168.1.4/Test/Songs/abc.flv', fs);
finally
fs.Free;
end;
end;
--- End code ---
typo:
http://sourceforge.net/projects/cac/?source=directory
tjpren:
Thanks Typo,
It would appear as though somewhere within the YouTube URL, is an actual location, from which you can initiate a download. I've read that YouTube regularly change the method of hiding this link. A lot of CAC's code is spent on getting this link using RegExpr.pas. I noticed a similar approach in a Delphi.
From a learing perspective, I'm going to look more deeply into how this is accomplished.
When I tried CAC, it failed to download, so in the 8months since the last release, youtube have changed their method again.
However, apart from hiding the link, the actual method of download is accomplished with Synapse.
Thanks for the help.
Regards
mica:
Look at the SVN
the Youtube issue seems to be fixed
http://cac.svn.sourceforge.net/viewvc/cac/source/
CFA2k:
@tjpren
I´m the Developer of CaC.
If you have any questions, feel free to send me a message :)
Navigation
[0] Message Index
[#] Next page