Can't log in? Can't recover your password? Need help? Contact me via email: unverified@hotmail.com
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5


[vb.net]Youtube to Mp3 Converter/Downloader [Source Code]
02-12-2012, 04:49 PM
Post: #1

psycho.ts Offline
Junior Member


Posts: 17
Joined: Aug 2012
Reputation: 0
Points: 0 SP
[vb.net]Youtube to Mp3 Converter/Downloader [Source Code]
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]
10-01-2012, 03:57 AM
Post: #2

Nailo Away
√-1 2³ Σ π


Posts: 1,885
Joined: Aug 2012
Reputation: 0
Points: 0 SP
RE: [vb.net]Youtube to Mp3 Converter/Downloader [Source Code]
oh yes thanks this will come handy

Check My Programming Video Tutorials.
10-11-2012, 02:52 AM
Post: #3

::nplz_boy:: Offline
Junior Member


Posts: 7
Joined: Oct 2012
Reputation: 0
Points: 0 SP
RE: [vb.net]Youtube to Mp3 Converter/Downloader [Source Code]
Its Getting Error or Debug .. can u post step by step image ?
10-11-2012, 10:08 AM
Post: #4

3r3bus Offline
Certified rapist


Posts: 1,013
Joined: Aug 2012
Reputation: 0
Points: 0 SP
RE: [vb.net]Youtube to Mp3 Converter/Downloader [Source Code]
Bookmarked, Could come in very handy!

01-09-2013, 02:13 PM
Post: #5

shizfs Offline
Junior Member


Posts: 4
Joined: Jan 2013
Reputation: 0
Points: 0 SP
RE: [vb.net]Youtube to Mp3 Converter/Downloader [Source Code]
getting an error on button 2 any fix?
01-09-2013, 02:20 PM
Post: #6

RA1N Offline
Senior Member


Posts: 519
Joined: Oct 2012
Reputation: 0
Points: 0 SP
RE: [vb.net]Youtube to Mp3 Converter/Downloader [Source Code]
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]
01-09-2013, 02:26 PM
Post: #7

shizfs Offline
Junior Member


Posts: 4
Joined: Jan 2013
Reputation: 0
Points: 0 SP
RE: [vb.net]Youtube to Mp3 Converter/Downloader [Source Code]
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!
01-10-2013, 01:06 PM
Post: #8

RA1N Offline
Senior Member


Posts: 519
Joined: Oct 2012
Reputation: 0
Points: 0 SP
RE: [vb.net]Youtube to Mp3 Converter/Downloader [Source Code]
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]
03-21-2013, 07:32 AM
Post: #9

Exploits Offline
Senior Member


Posts: 473
Joined: Mar 2013
Reputation: 29
Points: 0 SP
RE: [vb.net]Youtube to Mp3 Converter/Downloader [Source Code]
(03-21-2013 06: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]
03-22-2013, 02:02 PM
Post: #10

ArkPhaze Offline
Posting Freak


Posts: 1,480
Joined: Aug 2012
Reputation: 1
Points: 2 SP
RE: [vb.net]Youtube to Mp3 Converter/Downloader [Source Code]
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 ]


Thread Options


User(s) browsing this thread: 1 Guest(s)