[Help]Youtube Commenter
I now know this is patched to a large extent since youtube implemented captcha commenting, but I would still like to learn it. I have set up most of the source code, but I am stuck on figuring out how to get the links for users. Basically what the program does is searches a string, then gathers users based on that string. I have it working(basically) with this code:
GetText gets the webpages source, and then GetLinks gets the users. Unfortunately, this only works to a small extent because it will only get one user. Even if I loop it, that same user will be harvested over and over instead of different users being chosen. I'm sure there's a simple solution to this, but I can't figure it out for the life of me. Any help would be appreciated.
Code:
Private Function GetText(ByVal url As String)
Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(url)
Dim response As System.Net.HttpWebResponse = request.GetResponse()
Dim sr As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream(), System.Text.Encoding.GetEncoding("windows-1252"))
readString = sr.ReadToEnd()
sr.Close()
Return readString
End Function
Private Function GetLinks(ByVal returnVar As String, ByVal searchStart As String, ByVal searchEnd As String)
Dim i As Integer = 0
Dim fini As Integer = 0
Dim f As Integer = 0
Dim l As Integer = 0
l = searchStart.Length
i = readString.IndexOf(searchStart)
i = i + l
f = readString.IndexOf(searchEnd, i)
f = f - 1
fini = f - i
returnVar = readString.Substring(i, fini)
Return returnVar
End Sub

