Hello Daniweb'ers,

I was wondering if you could help me. I'm developing a YouTube downloader and want to be able to convert a YouTube link into a title. Such as this:

textbox1.Text = " http://www.youtube.com/watch?v=Bj7_W1FuO70&feature=related "
label1.Text = " Fire Like This Hardknox Me Myself And Irene "

In other words, take the link and get the title of it. I think I might just be over looking something, because I know how to do it with local files (c:\). Making the downloader work with the latest version of YouTube scheme was a task in it of itself.


Thanks!
-camelCase

If I understand this correctly, you will give a caption to Label1 depending on the link provided?

Select Case Text1.Text

Case Is = " http://www.youtube.com/watch?v=Bj7_W...eature=related "
Label1.Caption = "Me, Myself and Irene"

Case Is = ".........."
Label1.Caption = "Only Dots"

End Select

If I understand this correctly, you will give a caption to Label1 depending on the link provided?

Select Case Text1.Text

Case Is = " http://www.youtube.com/watch?v=Bj7_W...eature=related "
Label1.Caption = "Me, Myself and Irene"

Case Is = ".........."
Label1.Caption = "Only Dots"

End Select

Sorry, I should have been more clear. When the user enters the link into textbox1 I want to be able to locate the title of the link. Process:

-User enters URL into textbox1
-Application searches for the link (textbox1.text)
-Locates the link retrieves the title of the video
-Says "are you sure you want to download" followed by the title of the movie

I'm not sure how to do this. I got the idea from YouTube downloader by AlterVista.

Try and use something like this. I have not tested this, but try.

Add a webbrowser control to your form.

dim strCont as String
strCont = webBrowser1.Document.body.Title

In your sample this will return - YouTube
- ‪Fire Like This Hardknox Me Myself And Irene‬‎

Now use 'InStr' or 'Mid' to cut the title that you want to use and then add the caption to your label.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.