public partial class GetData : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

//string path = Server.MapPath("~/css/css.css");
//using (StreamReader sr = new StreamReader(path))
//{
// string all_code = sr.ReadToEnd();
// ArrayList my_list = new ArrayList();
// //string p = @"http://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?";
// string p = @"background\:url\((?<ImgUrl>.*?)\)";
// //string p = @"(?<=\b(?:src\s*=\s*['""]?|background:\s*.*?\burl\b\()(?!http:))/?([^'""\s\)]+)";
// Regex re = new Regex(p, RegexOptions.IgnoreCase);
// MatchCollection mc = re.Matches(all_code);

// for (int i = 0; i <= mc.Count - 1; i++)
// {
// bool _foo = false;
// string name = "http://d1mr.com/" + mc[i].ToString().TrimEnd(')').Replace("background:url(", "");
// //string name = mc[i].ToString();
// foreach (string list in my_list)
// {
// if (name == list)
// {
// _foo = true;
// break;
// }
// }//过滤
// if (!_foo)
// {
// try
// {
// WebClient wc = new WebClient();
// wc.DownloadFile(name, Server.MapPath("~/images") + @"\" + Path.GetFileName(name));
// }
// catch (Exception ex)
// {

// }

// //images
// //Response.Write(name + "\n");
// }

// }
//}

//string path = Server.MapPath("~/images1");
//foreach (string item in Directory.GetFiles(path))
//{
// //string pageHtml = LeYour.Common.WebCatcher.GetPageData("http://localhost:3333/经典香氛_美容健康_YOKA时尚网.htm");
// string pageHtml = LeYour.Common.WebCatcher.GetPageData("http://localhost:3333/shoumm/" + Path.GetFileName(item));
// Regex searchTitle = new Regex("<title>(?<title>[\\s\\S]*?)<\\/title>", RegexOptions.IgnoreCase);
// Match oM = searchTitle.Match(pageHtml);

// if (oM.Success)
// {
// Response.Write(oM.Groups["title"].Value.Trim());
// string matchEvents = "<table width=\"600\" border=\"0\" cellpadding=\"3\".*?</table>";
// string Content = Regex.Match(pageHtml, matchEvents, RegexOptions.Singleline).Value;

// if (!string.IsNullOrEmpty(Content))
// {
// ICommon common = CommonProxy.GetProxy("MeiRong.MeiRong_Temp", "ID");
// Dictionary<string, object> dict = new Dictionary<string, object>();
// dict.Add("Title", oM.Groups["title"].Value.Trim());
// dict.Add("Content", Content);
// dict.Add("CreateTime", DateTime.Now);
// common.Insert(dict);
// //Response.Write(Events);
// }

// }

//}

//string matchEvents = "(<table width=\"600\" border=\"0\" cellpadding=\"3\".*?</table>)(?:\\s*<div align=\"center\">)";

// string path = Server.MapPath("~/hufu[1].txt");
// using (StreamReader sr = new StreamReader(path))
// {
// string all_code = sr.ReadToEnd();
// ArrayList my_list = new ArrayList();
// string p = @"http://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?";
// Regex re = new Regex(p, RegexOptions.IgnoreCase);
// MatchCollection mc = re.Matches(all_code);

// for (int i = 0; i <= mc.Count - 1; i++)
// {
// bool _foo = false;
// string name = mc[i].ToString();
// foreach (string list in my_list)
// {
// if (name == list)
// {
// _foo = true;
// break;
// }
// }//过滤
// if (!_foo)
// {
// try
// {
// WebClient wc = new WebClient();
// wc.DownloadFile(name, Server.MapPath("~/images") + @"\" + Path.GetFileName(name));
// }
// catch
// {

// }

// //images
// //Response.Write(name + "\n");
// }

// }
// }
}

getdata的更多相关文章

  1. dataTransfer.getData()在dragover,dragenter,dragleave中无法获取数据的问题

    做拖拽相关效果时,想在ondragover时给被拖拽元素添加一些样式,于是在dragover事件的函数中通过dataTransfer.getData()获取在dragstart中设置的数据,然而发现d ...

  2. [DFNews] GetData也出取证软件了

    从事计算机取证的应该都听说过MIP(Mount Image Pro).VFC仿真和Recover My Files,上述三个应用比较广泛的软件都是GetData公司的产品.GetData现在也推出了自 ...

  3. EasyUI datagrid数据表格的函数getData返回来的是什么

    EasyUI datagrid数据表格的函数getData返回来的是什么? 他返回来的是这么一个对象: Object { rows=[10], total=15} 其中rows就是每一行的数据,是这些 ...

  4. 在jQuery.getData中renderCallback使用不同创建方式的结果

    JavaScript 中需要创建函数的话,有两种方法:函数声明.函数表达式,各自写法如下:// 方法一:函数声明function foo() {}// 方法二:函数表达式var foo = funct ...

  5. 用jquery设置的值,miniui.getData取不到

    用jquery设置的值,miniui.getData取不到

  6. android 手机拍照返回 Intent==null 以及intent.getData==null

    手机拍照第一种情况:private void takePicture(){ Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);Si ...

  7. :c#的remoting里,CallContext.GetData获得的对象老是空的?该怎么处理

    寻求帮助:c#的remoting里,CallContext.GetData获得的对象老是空的?如题,检查了很多次了,也比对了msdn里的例子,没觉得有问题啊..为什么老是得到的null的?不知道哪里出 ...

  8. 9.使用GetData,Children实现对ZNode的监控

    一. zookeeper中的watcher 1. exists :监控的是[znode]的CUD 的操作   2. getdata 的时候注册的watcher[U,D 监控]update delete ...

  9. js【面向过程编程】、好、 【init()、 GetData()、 bindData()、bindDom、 bindEvent()、buyProduct()、AddProductToCart()】*****************

    1. 一般页面开发方式 [可读性差.可维护性差]------初级开发工程师 一般页面编写方法 var name = 'iphone8' var description = '手机中的战斗机 ' var ...

随机推荐

  1. java 常用集合例子

    package test; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import ...

  2. ios系统下,html5拍照上传的压缩处理

    http://gokercebeci.com/dev/canvasresize 通过canvas和base64的处理方式实现大尺寸照片的压缩和上传 介绍: https://github.com/zev ...

  3. encodeURI(encodeURI(name)) ;文件上传

    window.location.href = xxxx?a=encodeURI(encodeURI(name)) ;// 编码name是中文,页面部分需要编码两次name = java.net.URL ...

  4. 如何在ExtJS 6中使用Fashion美化应用程序

    在Ext JS 6,一个最大的改变就是框架合并,使用一个单一的代码库,就可以为每一种设备开发各具有良好体验的最好应用程序.它还带来了一种美化应用程序的新方式. 在本文,重点是Sencha Fashio ...

  5. Java文件读写

    import java.io.*; public class Study { public static void main(String[] args) { try { String strPath ...

  6. Centos7 + Windows7 双系统

    以前装双系统只要先装Windows7,然后再装Centos7的话,grub会自动添加原有的Windows7系统.不过在新的Centos7中需要手动修改. 步骤如下 $ sudo vi /etc/gru ...

  7. SQL Server附加数据库文件出错

    场景: 新装一台数据库服务器,装好后,附加数据库时出错.附加前的数据库架构没有在新服务器上安装.新服务器上只有默认dbo架构. 解决: 以windows身份验证登录,附加正常. 错误码可能为5120. ...

  8. 【MySQL】数据行长度的一些限制

    今天开发在导入数据的时候报一个错误: Row size too large. The maximum row size for the used table type, not counting BL ...

  9. DBA_Oracle DBA常用SQL汇总(概念)

    2014-06-20 Created By BaoXinjian

  10. 把vector中的string对象导入到字符指针数组中

    #include <iostream>#include <string>#include <vector>//#include <cctype>#inc ...