资源简介
恩..简单的scrapy简单的多层页面爬取程序,适用于初学者想尝试多层页面爬取又没有代码看的人,明天大概会写一篇博客分享大概的流程吧,到时候会有部分关键源码

代码片段和文件信息
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.OleDb;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Crawler
{
public class AddControl
{
//public static string Path = Environment.CurrentDirectory + @“\Miss.xlsx“;
private string xmlPath = Environment.CurrentDirectory + @“\Miss.xml“;
///
/// 将一个DataGridView填充数据,再返回给Form1
///
///
///
///
public DataGridView AddDataView()
{
DataGridView dataview = new DataGridView();
xmlToDataGridView(xmlPath dataview);
return dataview;
}
///
/// 加载xml数据以便detagridveiw使用
///
/// xml数据的 DataTable
public DataTable AddDataView2(string xmlPath1 string rootNode)
{
using (xmlControl xmlcon = new xmlControl(xmlPath1 rootNode))
{
DataTable dt = xmlcon.xmlToDataTable();
return dt;
}
}
///
/// 读取xml数据返回中间dt
///
/// xml文件路径
///
public DataTable xmlToDataGridView(string filePath DataGridView dgv)
{
xmlControl xmlcon = new xmlControl(xmlPath “task_table“);
DataTable dt = xmlcon.xmlToDataTable();
return dt;
//xmlControl xmlcon = new xmlControl(filePath “task_table“);
//DataTable dt = xmlcon.xmlToDataTable();
//dgv.DataSource = dt.DefaultView;
}
///
/// 新任务信息插入xml文件
///
///
/// 数据数组
public void InsertIntoxml(string filePath string[] datas string rootNode)
{
using (xmlControl xmlcon = new xmlControl(filePath rootNode))
{
xmlcon.xmlAddData(datas);
xmlcon.xmlSave();
}
}
///
/// 更新xml中任务数据
///
///
/// riptname“>任务脚本名称
/// 节点
///
public void UpdataIntoxml(string filePath string scriptname string nodename string data)
{
using (xmlControl xmlcon = new xmlControl(filePath “task_table“))
{
xmlcon.xmlUpdate(scriptname nodename data);
xmlcon.xmlSave();
}
}
///
/// 删除xml中任务信息
///
///
///
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 623 2018-06-18 12:03 爬虫new\爬虫\1117\.git\config
文件 73 2018-06-18 12:03 爬虫new\爬虫\1117\.git\desc
文件 23 2018-06-18 12:03 爬虫new\爬虫\1117\.git\HEAD
文件 177 2018-06-18 12:03 爬虫new\爬虫\1117\.git\hooks\README.sample
文件 9624 2018-06-18 12:04 爬虫new\爬虫\1117\.git\index
文件 113 2018-06-18 12:03 爬虫new\爬虫\1117\.git\info\exclude
文件 350 2018-06-18 12:04 爬虫new\爬虫\1117\.git\logs\HEAD
文件 350 2018-06-18 12:04 爬虫new\爬虫\1117\.git\logs\refs\heads\master
文件 150 2018-06-18 12:04 爬虫new\爬虫\1117\.git\ms-persist.xm
文件 4027 2018-06-18 12:04 爬虫new\爬虫\1117\.git\ob
文件 200 2018-06-18 12:04 爬虫new\爬虫\1117\.git\ob
文件 193061 2018-06-18 12:04 爬虫new\爬虫\1117\.git\ob
文件 89 2018-06-18 12:03 爬虫new\爬虫\1117\.git\ob
文件 708 2018-06-18 12:04 爬虫new\爬虫\1117\.git\ob
文件 743 2018-06-18 12:04 爬虫new\爬虫\1117\.git\ob
文件 146455 2018-06-18 12:04 爬虫new\爬虫\1117\.git\ob
文件 702 2018-06-18 12:04 爬虫new\爬虫\1117\.git\ob
文件 621 2018-06-18 12:04 爬虫new\爬虫\1117\.git\ob
文件 1340 2018-06-18 12:04 爬虫new\爬虫\1117\.git\ob
文件 3563 2018-06-18 12:04 爬虫new\爬虫\1117\.git\ob
文件 1665 2018-06-18 12:04 爬虫new\爬虫\1117\.git\ob
文件 707 2018-06-18 12:04 爬虫new\爬虫\1117\.git\ob
文件 1548 2018-06-18 12:04 爬虫new\爬虫\1117\.git\ob
文件 1863 2018-06-18 12:03 爬虫new\爬虫\1117\.git\ob
文件 614 2018-06-18 12:04 爬虫new\爬虫\1117\.git\ob
文件 391678 2018-06-18 12:04 爬虫new\爬虫\1117\.git\ob
文件 751 2018-06-18 12:03 爬虫new\爬虫\1117\.git\ob
文件 2100 2018-06-18 12:04 爬虫new\爬虫\1117\.git\ob
文件 132393 2018-06-18 12:04 爬虫new\爬虫\1117\.git\ob
文件 3952 2018-06-18 12:04 爬虫new\爬虫\1117\.git\ob
............此处省略506个文件信息
- 上一篇:计算机操作系统课后习题答案(第四版)
- 下一篇:雷达视觉融合检测
相关资源
- Pythonamp;课堂amp;笔记(高淇amp;400;集第
- Python中Numpy库最新教程
- 用python编写的移动彩信的发送程序
- Python全栈学习笔记面向对象大作业:
- python实现的ftp自动上传、下载脚本
- Python版的A*寻路算法
- IronPython IDE
- pip-10.0.1.tar.gz
- Data Science from Scratch 2nd Edition
- shape_predictor_68_face_landmarks.dat.bz2 68个标
- 爬取豆瓣电影TOP250程序,包含非常详
- 中文维基百科语料库百度网盘网址.
- MSCNN_dehaze.rar
- 爬取豆瓣排行榜电影数据(含GUI界面
- 字典文本资源
- Brainfuck / OoK 解码脚本
- 案例实战信用卡欺诈检测数据集
- 招商策略_抱团启示录那些年我们一起
- sip-4.19.zip
- scrapy+splash官方文档
- 树莓派3b+学习使用教程
- numpy 中文学习手册
- pytorch-1.4.0-py3.7_cpu_0.tar.bz2
- 机器学习实战 高清完整版PDF
- 泰坦尼克号0.81准确率实验报告.docx
-
abaqus sc
ripting reference manual.pdf - 网页版聊天程序--网络程序设计课程大
- Give Me Some Credit
-
ba
semap安装出错时,正确得pyproj文件 - 微信头像拼接工具
评论
共有 条评论