资源简介
C超级爬虫.zip
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Runtime.Remoting.Messaging;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace 网络爬虫
{
public partial class FrmDemoGo : Form
{
public FrmDemoGo()
{
InitializeComponent();
}
//等待采集链接的队列
private List NconnUrls = new List();
//等待采集的图片链接的下载队列
private List LoadingUrls = new List();
///
/// 已采集过图片的链接
///
private List UsedUrls = new List();
//已采集过链接的链接
private List UsedConnUrls = new List();
//已使用过的图片
private List UsedImgUrls = new List();
private readonly int _maxtask = 200;
private int _downingPicCount = 0;
private int _downLoadPicCount = 0;
private int _startDownPicCount = 0;
//线程
Thread Tstarting = null;
private void FrmDemoGo_Load(object sender EventArgs e)
{
CheckForIllegalCrossThreadCalls = false;
Tstarting = new Thread(DownLoading);
}
List urlList = new List();
private void btn_paconggo_Click(object sender EventArgs e)
{
Chioce_floder();
//初始链接加入等待采集的图片链接的下载队列
LoadingUrls.Add(txt_Url.Text);
//初始链接加入等待采集链接的队列
NconnUrls.Add(txt_Url.Text);
string url = HttpHelper.HtmlCodeRequest(this.txt_Url.Text.Trim());
txt_HttpResult.Text = url;
Global.WebUrl = StringHelper.GetPureUrl(txt_Url.Text);
//计时器开始
Tstarting.Start();
btn_paconggo.Enabled = false;
}
//图片文件存放地址
private void Chioce_floder()
{
fbd_url.ShowDialog();
string path = fbd_url.SelectedPath;
if (!string.IsNullOrEmpty(path))
{
Global.FloderUrl = fbd_url.SelectedPath + “\\“;
}
else
{
Global.FloderUrl = Application.StartupPath + Global.FloderMoUrl;
}
}
///
/// 下载成功
///
///
private void onDownLoadFinish(IAsyncResult asyncresult)
{
AsyncResult result = (AsyncResult)asyncresult;
StopTimeHandler del = (StopTimeHandler)result.AsyncDelegate;
string data = (string)result.AsyncState;
string name = del.EndInvoke(result);
TextPicChange(name + data);
_downLoadPicCount++;
_downingPicCount--;
TipDownLoad();
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-10-26 09:02 C#超级爬虫\
目录 0 2017-10-26 09:02 C#超级爬虫\网络爬虫\
文件 16958 2016-09-10 20:16 C#超级爬虫\网络爬虫\11.ico
文件 187 2016-09-10 15:23 C#超级爬虫\网络爬虫\App.config
文件 10722 2016-11-07 18:05 C#超级爬虫\网络爬虫\FrmDemoGo.Designer.cs
文件 7929 2016-11-07 18:15 C#超级爬虫\网络爬虫\FrmDemoGo.cs
文件 20812 2016-11-07 18:05 C#超级爬虫\网络爬虫\FrmDemoGo.resx
文件 572 2016-09-10 16:52 C#超级爬虫\网络爬虫\Global.cs
文件 12674 2016-09-10 19:25 C#超级爬虫\网络爬虫\HttpHelper.cs
文件 528 2016-09-10 15:30 C#超级爬虫\网络爬虫\Program.cs
目录 0 2017-10-26 09:02 C#超级爬虫\网络爬虫\Properties\
文件 1366 2016-09-10 15:23 C#超级爬虫\网络爬虫\Properties\AssemblyInfo.cs
文件 2876 2016-09-10 15:23 C#超级爬虫\网络爬虫\Properties\Resources.Designer.cs
文件 5612 2016-09-10 15:23 C#超级爬虫\网络爬虫\Properties\Resources.resx
文件 1099 2016-09-10 15:23 C#超级爬虫\网络爬虫\Properties\Settings.Designer.cs
文件 249 2016-09-10 15:23 C#超级爬虫\网络爬虫\Properties\Settings.settings
文件 1097 2016-09-10 16:58 C#超级爬虫\网络爬虫\StringHelper.cs
目录 0 2017-10-26 09:02 C#超级爬虫\网络爬虫\bin\
目录 0 2017-10-26 09:02 C#超级爬虫\网络爬虫\bin\Debug\
文件 49664 2016-11-07 18:05 C#超级爬虫\网络爬虫\bin\Debug\网络爬虫.exe
文件 187 2016-09-10 15:23 C#超级爬虫\网络爬虫\bin\Debug\网络爬虫.exe.config
文件 54784 2016-11-07 18:05 C#超级爬虫\网络爬虫\bin\Debug\网络爬虫.pdb
文件 22984 2016-11-07 18:13 C#超级爬虫\网络爬虫\bin\Debug\网络爬虫.vshost.exe
文件 187 2016-09-10 15:23 C#超级爬虫\网络爬虫\bin\Debug\网络爬虫.vshost.exe.config
文件 490 2012-06-06 02:06 C#超级爬虫\网络爬虫\bin\Debug\网络爬虫.vshost.exe.manifest
目录 0 2017-10-26 09:02 C#超级爬虫\网络爬虫\bin\Release\
目录 0 2017-10-26 09:02 C#超级爬虫\网络爬虫\obj\
目录 0 2017-10-26 09:02 C#超级爬虫\网络爬虫\obj\Debug\
文件 851 2016-11-07 17:58 C#超级爬虫\网络爬虫\obj\Debug\DesignTimeResolveAssemblyReferences.cache
文件 6991 2016-11-07 17:56 C#超级爬虫\网络爬虫\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
目录 0 2017-10-26 09:02 C#超级爬虫\网络爬虫\obj\Debug\TempPE\
............此处省略14个文件信息
- 上一篇:中国行政区矢量图
- 下一篇:城市公交线路添加查询
相关资源
- PID_AutoTune_v0.rar
- vspd7.2.308.zip
- 价值2k的H漫画小说系统
- Pythonamp;课堂amp;笔记(高淇amp;400;集第
- ddos压力测试工具99657
- UML建模大全
- 开源1A锂电池充电板TP4056原理图+PCB
- m1卡 ic卡可选择扇区初始化加密软件
- TSCC.exe
- FTP课程设计(服务端+客户端)
- 计算机图形学 边填充算法实现代码
- 电力系统潮流计算程序集合
- oracle数据迁移项目实施方案
- Web Api 通过文件流 文件到本地
- Visio图标-最新最全的网络通信图标库
- Spire API文档
- OpenGL参考手册
- Python中Numpy库最新教程
- SPD博士V5.3.exe
- 直流无刷电机方波驱动 stm32 例程代码
- layui后台管理模板
- 仿知乎界面小程序源代码
- 云平台-阿里云详细介绍
- photoshop经典1000例
- scratch垃圾分类源码(最终版本).sb
- IAR ARM 7.8破解
- TI CCS V5.4 安装步骤及破解文件
- 松下plc FP-XH的驱动
- 局域网硬件信息收集工具
- 加快Windows XP操作系统开机速度
评论
共有 条评论