Feb 5th, 2008, 08:16 PM
#1
Thread Starter
Junior Member
Downloading Youtube clips
Hi everyone
I'm trying to create a program on which i can download youtube clips bye pasting their links into a textbox and pressing a button but don't know how to do it. I searched in google but i couldn't find the right solution. I hope someone can help me.
Thanks in advanced!!!!!
Feb 5th, 2008, 08:19 PM
#2
Re: Downloading Youtube clips
Have you seen if they have any info on that on http://www.youtube.com/dev ?
Feb 6th, 2008, 10:05 AM
#3
Re: Downloading Youtube clips
What language are you using?
Feb 7th, 2008, 06:35 AM
#4
Thread Starter
Junior Member
Re: Downloading Youtube clips
Hi
I'm using Visual basic (vb.net 2005 IDE).
Feb 7th, 2008, 09:49 AM
#5
Re: Downloading Youtube clips
How about something like (untested)
Code:
My.Computer.Network.DownLoadFile(Textbox1.Text, "c:\vadi", "username", password")
Feb 7th, 2008, 10:37 AM
#6
Re: Downloading Youtube clips
The hard part might be trying to get the URL to the actual media file/flash video embedded in the page.
I could be mistaken, but I think they use JavaScript or something else to encode the URL to the .swf video file.
Feb 7th, 2008, 12:04 PM
#7
Re: Downloading Youtube clips
Its a dynamically determined path on a different server for downloading the flv file
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Feb 7th, 2008, 12:19 PM
#8
Re: Downloading Youtube clips
is there a way to determine the actual link? Perhaps calling the javascript?
Feb 7th, 2008, 12:57 PM
#9
Re: Downloading Youtube clips
Well there is a javascript variable that contains the path.
var swfUrl = '/player2.swf';
var swfArgs = {"e": "h", "sourceid": "y", "video_id": "6MFMEUtmF-A", "l": 44, "sk": "JKO_asxtlW_xe3eIs0UZ9AU", "t": "OEgsToPDskIZ6fUnnYIqLcvRuEZxQKSz", "hl": "en", "plid": "AARFlSgZ9IjBOJviAAAAoAAYAAA", "sdetail": "p%3A/browse"};
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Feb 7th, 2008, 03:58 PM
#10
Fanatic Member
Re: Downloading Youtube clips
I have The Method to Access to Those Clip flv without any programme
so if interested i can post how to get it & then we can you cree the algo for it & running in vb.Net 2005 & post it in the CodeBank !
Feb 7th, 2008, 04:03 PM
#11
Re: Downloading Youtube clips
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Feb 7th, 2008, 04:30 PM
#12
Fanatic Member
Re: Downloading Youtube clips
oK let's Take an Example !
1/This is the Link original from Youtube
http://www.youtube.com/watch?v=Ulf5CdFykX0
2/we will change This Url Like This way
http://www.youtube.com/watch/v/Ulf5CdFykX0
we removed the ? & = and replaced with /
when you type this 2 url you will Get The Url of the page like this
3/In The Browser Get The Url After &t= like
http://www.youtube.com/swf/l.swf?vid...n7pyvjYR30g849
Now This is The mean what we need , if we look well in the url what we need is this
&t=OEgsToPDskIpUGfLc8AzYa2_L5Zq_MSI
The one started from &t
4/Now enter The Full URL Like this & download Your file
http://youtube.com/get_video.php?vid...AzYa2_L5Zq_MSI
if we see very well
Ulf5CdFykX0 = The id of the url
&t=OEgsToPDskIpUGfLc8AzYa2_L5Zq_MSI = The link to download it
so Now we need to work on a algo that will do those operations
Thanks !
Feb 7th, 2008, 04:36 PM
#13
Re: Downloading Youtube clips
Oh yes I remember that method. Its from this post by Chris001
http://www.vbforums.com/showpost.php...78&postcount=2
But it seems there are some issues with it as noted in the thread.
My solution works fine if you want to download the video right away, but you can't post the final link on an other webpage, because the link expires.
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Feb 7th, 2008, 04:42 PM
#14
Fanatic Member
Re: Downloading Youtube clips
sorry I havent seen This Thread before , because this way i got it from my sister
Feb 7th, 2008, 04:51 PM
#15
Re: Downloading Youtube clips
Well as long as the issue gets solved
We cant be sure but it may appear that its for immediate download but if not then the links will be broken.
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Feb 7th, 2008, 08:44 PM
#16
Thread Starter
Junior Member
Re: Downloading Youtube clips
First of all thanks for your replies!!!!!!
Guys i tried this things but it only downloads only a small file like 100kb or so.
So it doesnt work. I would eppriciate if someone could give me a sample of that cos i don't think that i can do it otherwise.
Thanks in advanced!!!
Feb 7th, 2008, 10:22 PM
#17
Re: Downloading Youtube clips
I followed the directions ffrom the link I posted and it downloaded a 7.9 MB file.
This is my end result url I constructed but remember that it will only be available for a short time.
http://www.youtube.com/get_video.php...GWOFRYyCQ4KOqd
VB/Office Guru™ (AKA: Gangsta Yoda ™ ® )
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it!
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6
Feb 8th, 2008, 12:42 AM
#18
Re: Downloading Youtube clips
they worked for me too, IN A BROWSER. If you try to copy the link into a download accelerator, it fails. Incidently, if you get a 100kb file, rename it with a .htm extension and look again...
Feb 9th, 2008, 06:00 AM
#19
Thread Starter
Junior Member
Re: Downloading Youtube clips
Guys thanks for your efforts but this is not what i was looking for. I expected code or a sample program. I will google a bit and see what i can find.
Thank
Feb 9th, 2008, 08:46 AM
#20
Fanatic Member
Re: Downloading Youtube clips
Originally Posted by
vadi
Guys thanks for your efforts but this is not what i was looking for. I expected code or a sample program. I will google a bit and see what i can find.
Thank
Because it's Not a Direct Link !
Feb 9th, 2008, 10:19 AM
#21
Re: Downloading Youtube clips
i put this together, it's best to run it in another thread ( Backgroundworker ) otherwise the app will sit there locked out until the download has done.
i tested it on a few vids.
Code:
'/// ENTER THE URL THAT YOU WOULD WATCH THE VID ON IN BROWSER ...
Dim request As HttpWebRequest = DirectCast(HttpWebRequest.Create("http://www.youtube.com/watch?v=FJaAe7sYoCA"), HttpWebRequest)
Dim response As HttpWebResponse = DirectCast(request.GetResponse, HttpWebResponse)
Dim source As String = New StreamReader(response.GetResponseStream, System.Text.Encoding.Default).ReadToEnd
If source.IndexOf("video_id=") > -1 Then
Dim url As String = System.Text.RegularExpressions.Regex.Split(source, "video_id=")(1)
url = "http://www.youtube.com/get_video?video_id=" & System.Text.RegularExpressions.Regex.Split(url, "&title=")(0)
Dim wc As New WebClient
wc.DownloadFile(url, "C:\FJaAe7sYoCA.flv")
End If
response.Close()
might start you off.
~
if a post is resolved, please mark it as [Resolved ]
protected string get_Signature(){return Censored;}
[vbcode ][php ] please use code tags when posting any code [/php ][/vbcode ]
Feb 9th, 2008, 02:57 PM
#22
Re: Downloading Youtube clips
Here's a VB6 version. Internet Explorer must be installed, because it uses DoFileDownload to download the video.
Attached Files
Feb 9th, 2008, 06:06 PM
#23
New Member
Re: Downloading Youtube clips
Originally Posted by
killer7k
thank you!!! for share this code
Apr 2nd, 2008, 01:25 PM
#24
Member
Re: Downloading Youtube clips
Originally Posted by
dynamic_sysop
i put this together, it's best to run it in another thread ( Backgroundworker ) otherwise the app will sit there locked out until the download has done.
i tested it on a few vids.
Code:
'/// ENTER THE URL THAT YOU WOULD WATCH THE VID ON IN BROWSER ...
Dim request As HttpWebRequest = DirectCast(HttpWebRequest.Create("http://www.youtube.com/watch?v=FJaAe7sYoCA"), HttpWebRequest)
Dim response As HttpWebResponse = DirectCast(request.GetResponse, HttpWebResponse)
Dim source As String = New StreamReader(response.GetResponseStream, System.Text.Encoding.Default).ReadToEnd
If source.IndexOf("video_id=") > -1 Then
Dim url As String = System.Text.RegularExpressions.Regex.Split(source, "video_id=")(1)
url = "http://www.youtube.com/get_video?video_id=" & System.Text.RegularExpressions.Regex.Split(url, "&title=")(0)
Dim wc As New WebClient
wc.DownloadFile(url, "C:\FJaAe7sYoCA.flv")
End If
response.Close()
might start you off.
thanks man it works great
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width