Needing Help ASAP!
If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
2 posts
Page 1 of 1
Ok, I need help on this one.
I don't know the ID=" of this
Download button: The Link to the Full Source Code is here.
view-source:http://www.youtube-mp3.org/
Thanks in Advance!
I don't know the ID=" of this
Download button: The Link to the Full Source Code is here.
view-source:http://www.youtube-mp3.org/
Thanks in Advance!
You do not have the required permissions to view the files attached to this post.
The download link itself doesn't have an ID, though you can still access the element from its parent div tag.
This tag doesn't appear until the convert video button has been clicked.
You can use this code to show the link and get the URL:
This tag doesn't appear until the convert video button has been clicked.
You can use this code to show the link and get the URL:
Code: Select all
Dim inputConvert As HtmlElement
Private Sub WebBrowser1_DocumentCompleted(sender As System.Object, e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
If e.Url.ToString() = "http://www.youtube-mp3.org/" Then
inputConvert = WebBrowser1.Document.GetElementById("submit")
End If
End Sub
Private Sub btnConvert_Click(sender As System.Object, e As System.EventArgs) Handles btnConvert.Click
inputConvert.InvokeMember("click")
End Sub
Private Sub btnGetLink_Click(sender As System.Object, e As System.EventArgs) Handles btnGetLink.Click
Dim dl_link As HtmlElement = WebBrowser1.Document.GetElementById("dl_link")
Dim links As HtmlElementCollection = dl_link.GetElementsByTagName("a")
Dim url As String = links(0).GetAttribute("href")
MsgBox(url)
End Sub
2 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023