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

头条搜索Bytespider IP反解析

反查IP站长可以通过DNS反查IP的方式判断某只spider是否来自头条搜索引擎。根据平台不同验证方法不同,如linux/windows/os三种平台下的验证方法分别如下在linux平台下,您可以使用host ip命令反解ip来判断是否来自Bytespider的抓取。Bytespider的hostname以*.bytedance.com的格式命名,非 *.bytedance.com即为冒充host

Public @ 2013-03-31 15:38:59

Baiduspider对一个网站服务器造成的访问压力如何?

为了达到对目标资源较好的检索效果,Baiduspider需要对您的网站保持一定量的抓取。我们尽量不给网站带来不合理的负担,并会根据服务器承受能力,网站质量,网站更新等综合因素来进行调整。如果您觉得baiduspider的访问行为有任何不合理的情况,您可以反馈至反馈中心

Public @ 2020-03-29 15:56:49

网站的搜索引擎蜘蛛抓取越多越好?事实未必

做过SEO或站长的都应该知道,网站要想做排名就必须使网站文章先收录,而网站内容收录由跟搜索引擎蜘蛛的来访抓取有很大的关系。搜索引擎蜘蛛,又被称为网页爬虫,网络机器人,在FOAF社区中间,也经常被称为网页追逐者,是一种按照一定的规则,自动的抓取万维网信息的程序或者脚本。另外它还有一些不常使用的名字,如:蚂蚁,自动索引,模拟程序或者蠕虫。那么,对于一个网站来说,是不是来网站爬行的搜索引擎蜘蛛越多越好呢

Public @ 2015-11-05 16:22:38

什么是模拟蜘蛛抓取

站长可以输入自己网站上的任何一个网址,网管工具会发出Google蜘蛛,实时抓取页面内容,并显示出抓取的HTML代码,包括服务器头信息和页面代码。另外工具也可以用来检查页面是否被黑。有时候黑客放入的代码会检查浏览器类型,如果是用户使用普通浏览器访问则返回正常内容,如果是搜索引擎蜘蛛访问,才返回黑客加上去的垃圾内容和垃圾链接。所以站长自己访问网站看不出异样,Google蜘蛛抓取到的却不是站长自己看到的

Public @ 2011-01-25 16:22:34

更多您感兴趣的搜索

0.484962s