Login Register






Thread Rating:
  • 0 Vote(s) - 0 Average
Thread Closed 


[vb.net]Youtube to Mp3 Converter/Downloader [Source Code] filter_list
Author
Message
[vb.net]Youtube to Mp3 Converter/Downloader [Source Code] #1
This is the Source for How to Make a Youtube to MP3 Downloader / Generator /Converter

Using Webbrowser
By Using this you Need
Webbrowser
textbox1/textbox2
Button1 for Navigate
Button2 for Download/Convert/Generator
On the Form Load add this Code
Code:
webbrowser1.navigate("http://www.youtube-mp3.org/")

Click the Button1 and add this Code
Code:
webbrowser1.document.GetElementById("youtube-url").SetAttribute("Value", TextBox1.Text)
webbrowser1.document.GetElementById("submit").InvokeMember("Click")

Click the Button2 and add this code
Code:
Dim s As String = WebBrowser1.Document.GetElementById("dl_link").InnerHtml
        Dim redirect As String = s.Replace("<A href=""", "").Replace("""><B>Download</B></A> · <A onclick=""showLinkBox(); return false;"" href=""http://www.youtube-mp3.org/#"">Link this mp3</A>", "")
        TextBox2.Text = redirect
webbrowser1.navigate(redirect)


Using Webclient
This site [http://www.youtube-mp3.org] uses the GET method
so Simple Code
You Need
Code:
[*]Button
[*]Textbox1/Textbox2
[*]PictureBox to show screenshot

Imports
Code:
Imports system.net
Imports System.Text.RegularExpressions

Add a Button then enter this code
[i've Used the Regex to Grab the Values Biggrin
Code:
Dim s as new webclient
        Dim y As String = s.DownloadString("http://www.youtube-mp3.org/api/itemInfo/?video_id=" + Textbox1.text )
        Dim linkoriginal As New System.Text.RegularExpressions.Regex("""image"" : ""(\S+)""\D+\S+\D+""h"" : ""(\S+)""")
        Dim matches As MatchCollection = linkoriginal.Matches(y)
        For Each showlink As Match In matches
           Dim u As String = (showlink.Groups(1).Value)
            Dim t As String = (showlink.Groups(2).Value)
            TextBox2.Text = "http://www.youtube-mp3.org/get?video_id=" + TextBox1.Text + "&h=" + t
            PictureBox1.Image = New Drawing.Bitmap(New IO.MemoryStream(s.DownloadData(u)))
        Next

[Image: zHp4n.png]


RE: [vb.net]Youtube to Mp3 Converter/Downloader [Source Code] #2
oh yes thanks this will come handy


RE: [vb.net]Youtube to Mp3 Converter/Downloader [Source Code] #3
Its Getting Error or Debug .. can u post step by step image ?


RE: [vb.net]Youtube to Mp3 Converter/Downloader [Source Code] #4
Bookmarked, Could come in very handy!




RE: [vb.net]Youtube to Mp3 Converter/Downloader [Source Code] #5
getting an error on button 2 any fix?


RE: [vb.net]Youtube to Mp3 Converter/Downloader [Source Code] #6
Can we please stop just using others API's instead actually hard code it. Like get the stream of the video then just download the string, and save it to a MP4 file or what ever video file you want. Now to convert to MP3 just do a simple conversion method and boom! you have a YouTube to mp3 all made by hand instead of ripping other peoples work.
[username], need some help?, PM me.
[Image: kjKks6Y.png]


RE: [vb.net]Youtube to Mp3 Converter/Downloader [Source Code] #7
uhh yeah but um im a newbie and really found vb interesting, just wanted to try this out as starters wouldnt mind a bit of help on this!


RE: [vb.net]Youtube to Mp3 Converter/Downloader [Source Code] #8
VB is my favorite language. Just saying I am really sorry, but I hate it when people use others API instead of doing it the "Hard" way. Mainly because no one learns from these sources. Maybe how to use online API's of others but still.
[username], need some help?, PM me.
[Image: kjKks6Y.png]


RE: [vb.net]Youtube to Mp3 Converter/Downloader [Source Code] #9
(03-21-2013, 07:36 AM)TrossyFirst Wrote: Ripped code from another forum, noob.

do you have any proof of this? or are you just accusing him?

anyways nice share man!!! thanks Wink
[Image: HChelpers_zps3210ab3a.png]


RE: [vb.net]Youtube to Mp3 Converter/Downloader [Source Code] #10
Since it got bumped I'll add in my comment: Why is this another HTTP request based program using the WebBrowser control for no reason? (Use WebRequests!)

:ok:
ArkPhaze
"Object oriented way to get rich? Inheritance"
Getting Started: C/C++ | Common Mistakes
[ Assembly / C++ / .NET / Haskell / J Programmer ]








Users browsing this thread: 1 Guest(s)