Categories


Tags


抢先式多线程网络蜘蛛

框架 // Copyright(C) 2017 铭飞科技 // #region 版权信息 /* * 此文件自 Copyright(C) 2008 - 2017 铭飞科技 Classification:无 开源网站:http://www.http://www. coding */ #endregion using System; using System.Data; using System.Web.UI; using System.Web.UI.WebControls; using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; namespace Web.Templates.UI { ///

/// 标签树控件 /// public class Tree : System.Web.UI.WebControls.TreeView { private string _styleName = ""; /// /// 样式 /// /// The name of the style. public string StyleName { get { return _styleName; } set { _styleName = value; } } private string _checkedValue = ""; /// /// 默认选中当前值 /// /// The checked value. public string CheckedValue { get { return _checkedValue; } set { _checkedValue = value; } } private string _checkBoxName = ""; /// /// 复选框名称 /// /// The check box name. public string CheckBoxName { get { return _checkBoxName; } set { _checkBoxName = value; } } private int _checkParentType = -1; /// /// /// /// The type of the check parent. public int CheckParentType { get { return _checkParentType; } set { _checkParentType = value; } } private int _checkChildType = -1; /// /// /// /// The type of the check child. public int CheckChildType { get { return _checkChildType; } set { _checkChildType = value; } } private string _showLevel = "999"; /// /// 显示层级 /// /// The show level. public string ShowLevel { get { return _showLevel; } set { _showLevel = value; } } private string _valueField = "id"; /// /// 编号字段名 /// /// The value field. public string ValueField { get { return _valueField; } set { _valueField = value; } } private string _textField = "title"; /// /// 显示字段名 /// /// The text field. public string TextField { get { return _textField; } set { _textField = value; } } private string _fatherField = "parentid"; /// /// 父编号字段名 /// /// The father field. public string FatherField { get { return _fatherField; } set { _fatherField = value; } } private TreeNodeBindEventHandler _onBind; /// /// 构建事件 /// /// The on bind event. public event TreeNodeBindEventHandler OnBind { add { _onBind += value; } remove { _onBind -= value; } } private DataTable _dataSource; /// /// 数据源 /// /// The data source. public DataTable DataSource { get { return _dataSource; } set { _dataSource = value; } } /// /// 绑定数据 /// public override void DataBind() { this.Nodes.Clear(); this.ShowCheckBox = this.CheckBoxName != "" && this.CheckBoxName != null; if (_dataSource != null) { TreeNode root_node = new TreeNode(); root_node.Value = "-1"; root_node.Text = "根目录"; Nodes.Add(root_node); List root_list = new List(); for (int i = 0; i < _dataSource.Rows.Count; i++) { TreeNode node = new TreeNode(); DataRow dr = _dataSource.Rows[i]; node.Value = dr[_valueField].ToString(); node.Text = dr[_textField].ToString(); node.SelectAction = TreeNodeSelectAction.None; //node.Depth =int.Parse(_showLevel); if (_onBind != null) { _onBind(node); } if (dr[_fatherField].ToString() == "-1" || dr[_fatherField].ToString() == "0") { Nodes.Add(node); if (node.Value == _checkedValue) { node.Checked = true; } int has = 0; for (int j = 0; j < root_list.Count; j++) { if (root_list[j] == int.Parse(node.Value)) { has = 1; } } if (has == 0) { root_list.Add(int.Parse(node.Value)); } } else { TreeNode father_node = GetNode(root_node, dr[_fatherField].ToString()); if (father_node != null) { father_node.ChildNodes.Add(node); if (node.Value == _checkedValue) { node.Checked = true; } } } } //绑定事件,自动勾选父级节点 if (this.CheckParentType == 0 || this.CheckChildType == 0) { string enterjvice = ""; if (this.CheckParentType == 0) { enterjvice += "FatherChecked"; } if (this.CheckChildType == 0) { enterjvice += "ChildChecked"; } if (enterjvice != "" && this.Nodes.Count > 0) { this.Attributes.Add("onclick", "JscAutoCheckedNode(this,'" + enterjvice + "');"); } } } base.DataBind(); } /// /// 构建HTML /// /// The object that receives the server control content. protected override void Render(HtmlTextWriter writer) { string[] style_list = new string[] { "admin_tree", "data_tree", "input_tree", "menu_tree", "popmenu_tree" }; switch (_styleName) { case "menu_tree": this.ShowCheckBox = false; this.CssClass += " menu"; break; case "popmenu_tree": this.

Public @ 2023-02-24 22:25:29

为什么Baiduspider不停的抓取我的网站?

为什么Baiduspider不停的抓取我的网站?对于您网站上新产生的或者持续更新的页面,Baiduspider会持续抓取。此外,您也可以检查网站访问日志中Baiduspider的访问是否正常,以防止有人恶意冒充Baiduspider来频繁抓取您的网站。 如果您发现Baiduspider非正常抓取您的网站,请通过反馈中心反馈给我们,并请尽量给出Baiduspider对贵站的访问日志,以便于我们跟踪处

Public @ 2009-09-30 15:38:42

百度spider介绍

百度spider,简称Baidu Spider,是百度搜索引擎爬虫程序,主要用于收集互联网上的网页信息,以提供更好的搜索结果。Baidu Spider 负责从网页中抓取文字、图片、链接等信息,并将这些信息交给百度索引系统进行处理。Baidu Spider 会根据设置好的规则,定期抓取网页内容,以确保百度搜索引擎中有最新的信息。Baidu Spider 还能够支持对 AJAX、JS 等动态页面进行抓

Public @ 2023-06-13 04:50:12

什么是搜索引擎蜘蛛

搜索引擎蜘蛛可以简单的理解为页面信息采集工具,不需要人工去采集,它会自动根据URL链接一个一个爬行过去,然后再抓取页面的信息,然后再存到服务器的列队中,为用户提供目标主题所需要的数据资源,搜索引擎蜘蛛不是所有的页面都会抓取的,主要有三个原因:一是技术上的原因。二是服务器存储方面的原因。三是提供用户搜索数据量太大,会影响效率。所以说,搜索引擎蜘蛛一般只是抓取那些重要的网页,而在抓取的时候评价重要性主

Public @ 2017-10-04 16:22:29

什么是模拟蜘蛛抓取

模拟蜘蛛抓取是指通过计算机程序对蜘蛛行为进行模拟,实现自动化抓取网页内容的过程。蜘蛛抓取通常用于搜索引擎、数据挖掘、网络爬虫等应用,通过模拟蜘蛛的方式,可以自动遍历互联网上的网页,提取其中的信息,例如网页的标题、正文内容、链接等。 模拟蜘蛛抓取的过程通常分为以下几个步骤: 1. 初始URL列表:确定起始的URL列表,作为开始抓取的入口。 2. 发送HTTP请求:程序向目标URL发送HTTP请求,

Public @ 2023-07-24 01:00:31

更多您感兴趣的搜索

0.462617s