吉阿吉

百度失信人名单爬虫

一、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
 
 
)

posted on 2021-04-27 13:55  吉阿吉  阅读(137)  评论(0编辑  收藏  举报

导航