使用c#在网页源中查找文件URL [英] Find FIle URL within web page source using c#

查看:57
本文介绍了使用c#在网页源中查找文件URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用HttpWebRequest来获取网页来源

i am using HttpWebRequest to get source of webpage

HttpWebRequest myReq = (HttpWebRequest)WebRequest.Create(textBox1.Text.ToString());
 HttpWebResponse myres = (HttpWebResponse)myReq.GetResponse();  
using (StreamReader sr = new StreamReader(myres.GetResponseStream()))
{
     pageContent = sr.ReadToEnd();
     
}





i希望在页面中找到文件URL

例如我在textBox中输入http://www.software.com并希望获得download.software.com/Files/mySoftware.exe



i want to find file-URL within page
for example i enter http://www.software.com in textBox and want to get download.software.com/Files/mySoftware.exe

推荐答案

这篇关于使用c#在网页源中查找文件URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆