其他分享
首页 > 其他分享> > 百度失信人名单爬虫

百度失信人名单爬虫

作者:互联网

一、item.py中定义数据模型

 

 

class Dishonest(scrapy.Item):

  name=scrapy.Field() card_num=scrapy.Field() age=scrapy.Field() area=scrapy.Field() business_entiy=scrapy.Field() content=scrapy.Field() publish_date=scrapy.Field() create_date=scrapy.Field() update_date=scrapy.Field()

二、保存失信人信息
create database dishonest;
drop table if exists dishonest;
create table dishonest(
dishonest_id INT NOT NULL AUTO_INCREMENT,
age INT NOT NULL,
name VARCHAR(200) NOT NULL,
card_num VARCHAR(50),
content VARCHAR(2000) NOT NULL,

 business_entity  VARCHAR(20) NOT NULL;
 publish_unit  VARCHAR(200);
 publish_date  VARCHAR(200);
 create_date DATETIME
 
 
)

标签:VARCHAR,dishonest,爬虫,失信,Field,scrapy,date,NULL,百度
来源: https://www.cnblogs.com/ajiling/p/14708665.html