Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Region "Split Methods"
- Public Shared Function getBetween(input As String, before As String, after As String) As String
- Try
- Return Regex.Split(Regex.Split(input, before)(1), after)(0)
- Catch ex As Exception
- End Try
- Return "Failed"
- End Function
- Public Shared Function SimpleSplit(input As String, before As String, after As String) As String
- input = input.Split(before).Last
- input = input.Split(after).First
- Return input
- End Function
- Public Shared Function midReturn(ByVal total As String, ByVal first As String, ByVal last As String)
- If last.Length < 1 Then
- midReturn = total.Substring(total.IndexOf(first))
- End If
- If first.Length < 1 Then
- midReturn = total.Substring(0, (total.IndexOf(last)))
- End If
- Try
- midReturn =
- ((total.Substring(total.IndexOf(first), (total.IndexOf(last) - total.IndexOf(first)))).Replace(first, "")) _
- .Replace(last, "")
- Catch ArgumentOutOfRangeException As Exception
- ' midReturn = "ERROR"
- End Try
- End Function
- #End Region
- web.Proxy = Nothing
- web.Headers.Add("user-agent", "Mozilla/5.0 (Windows; Windows NT 5.1; rv:1.9.2.4) Gecko/20100611 Firefox/3.6.4")
- Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(Vidlink)
- Using response As System.Net.HttpWebResponse = request.GetResponse
- Dim sr As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream())
- Return sr.ReadToEnd
- End Using
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement