如何处理显示视频的网页的响应流?

编程入门 行业动态 更新时间:2024-10-26 17:33:08
本文介绍了如何处理显示视频的网页的响应流?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 <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

用您的链接替换网址

更多推荐

如何处理显示视频的网页的响应流?

本文发布于:2023-11-25 14:21:16,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1630103.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何处理   网页   视频

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!