Results 1 to 5 of 5

Thread: [RESOLVED] [2008] Media Fire direct download link vb.net help

Hybrid View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2008
    Posts
    91

    Re: [2008] Media Fire direct download link vb.net help

    I got something working, not sure if its the best coding way of doing it but this is how I got it to work. Here's the code if anyone else wants to do something similar.

    Code:
    Imports System.Net
    Imports System.Windows.Forms
    Imports System.Security.Permissions
    Imports System.Text.RegularExpressions
    
    
    <PermissionSet(SecurityAction.Demand, Name:="FullTrust")> _
    <System.Runtime.InteropServices.ComVisibleAttribute(True)> _
    Public Class Form1
    
        Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            WebBrowser1.ObjectForScripting = Me
            WebBrowser1.Navigate("http://www.mediafire.com/?syzjuytmdkn")
            Timer1.Enabled = True
        End Sub
    
    
    
        Public Sub LinkDownload()
            Dim linkURL As String
            Dim myMatches As MatchCollection
            Dim myRegex As New Regex("href\s*=\s*(?:""(?<1>[^""]*)""|(?<1>\S+))")
    
            linkURL = WebBrowser1.Document.GetElementById("download_link").InnerHtml
            myMatches = myRegex.Matches(linkURL)
    
            If myMatches.Count = 0 Then
                Timer1.Enabled = True
            Else
                Dim newUrl As String
                Dim fixUrl As String
    
                newUrl = myMatches(0).Value
                fixUrl = Replace(newUrl.Substring(5, newUrl.Length - 5), """", "")
                Process.Start(fixUrl)
            End If
        End Sub
    
    
        Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles Timer1.Tick
            Timer1.Enabled = False
            Call LinkDownload()
        End Sub
    
    End Class

  2. #2
    New Member
    Join Date
    Nov 2011
    Posts
    1

    Re: [RESOLVED] [2008] Media Fire direct download link vb.net help

    Plz tell me how to use this code

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width