I can not get the source code of a youtube video
dim s as string
dim h as new HTTPSocket
s=h.Get("http://www.youtube.com/watch?v=C0opJdHiVOc", 90)
area.Text=s
returns it blank
how else I can see the source code of a video?
I can not get the source code of a youtube video
dim s as string
dim h as new HTTPSocket
s=h.Get("http://www.youtube.com/watch?v=C0opJdHiVOc", 90)
area.Text=s
returns it blank
how else I can see the source code of a video?
Youtube is https not http, so you’ll need to use a httpsecuresocket.
Thank you very much for answering
It does not work
dim s as string
dim h as new HTTPSecureSocket
s=h.Get("https://www.youtube.com/watch?v=C0opJdHiVOc", 90)
area.text = s
Works for me.
I’ve tried and returns blank
Anyway there must be other ways to view the source code
Thank you very much for your time!
You may not be waiting long enough, perhaps extend the 90 to 120.
Hello Sebastian,
I did try your code and it didn’t show the source code in the textarea either.
BUT if you look in the debugger at variable s, the source was read in there
correctly. So somehow the assignment to the viewer seems to fail.
It’s possible that the returned data includes a chr(0). The text fields won’t display anything beyond that.
I have tried all ways, and I have failed
I tried with this:
dim s as string
dim h as new HTTPSecureSocket
h.setRequestHeader("User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727; .NET CLR 1.1.4322)")
s = h.Get("https://www.youtube.com/watch?v=C0opJdHiVOc", 90)
area.text = s
also it returns blank…
Try subclassing HTTPSecureSocket and see what the response you get form YouTube is.
It works for me if I set the ConnectionType to TLSv1:
dim s as string
dim h as new HTTPSecureSocket
h.ConnectionType = HTTPSecureSocket.TLSv1
s=h.Get("http://www.youtube.com/watch?v=C0opJdHiVOc", 90)
area.Text=s
the problem is solved, thank you very much to all and especially Andrew!