本文介绍了如何处理显示视频的网页的响应流?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<html>
<body style="background-color: rgb(38,38,38);">
<video controls="" autoplay="" name="media"
style="margin: auto; position: absolute; top: 0; right: 0; bottom: 0; left: 0;"
src="av.vimeo/32372/157/24910156.mp4?token=1322514534_58acf41d56103820e9fe93763c73fadd">
</video>
</body>
</html>
以上是我尝试输入 URL :
但是,该程序仅崩溃并显示以下代码(即从不显示最终代码-这意味着流仍在继续)
However, the program just crashes with the following code (i.e. never even displays final - meaning stream is still going on)
除了我不想发生的来源之外,我还认为它正在流式传输视频
I think that it is streaming the video, in addition to the source- which I do not want to happen
如何检索此来源?
Dim final As String = "" Dim request1 As HttpWebRequest = DirectCast(WebRequest.Create(urlvimeohd), HttpWebRequest) request1.UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.112 Safari/535.1" Dim response1 As HttpWebResponse = DirectCast(request1.GetResponse(), HttpWebResponse) final = New StreamReader(response1.GetResponseStream).ReadToEnd MessageBox.Show(final)我只想要网页的来源.当我尝试webbrowser1.navigate时,消息源只是说技术难题".我该如何进行?
I just want the source of the webpage. When I try webbrowser1.navigate, the source just says "technical difficulties". How can I proceed?
推荐答案HttpWebRequest request = DirectCast(HttpWebRequest.Create(Url), HttpWebRequest)HttpWebResponse resp = DirectCast(request.GetResponse, HttpWebResponse) string sourcecode = New StreamReader(resp.GetResponseStream,System.Text.Encoding.Default).ReadToEnd
用您的链接替换网址
更多推荐
如何处理显示视频的网页的响应流?
发布评论