国家统计局爬虫样例
作者:互联网
items.py
import scrapy
class NewsItem(scrapy.Item):
# define the fields for your item here like:
# name = scrapy.Field()
title = scrapy.Field() # 标题
summary = scrapy.Field() # 主旨
origin = scrapy.Field() # 文章原文链接
cover = scrapy.Field() # 文章封面图片
author = scrapy.Field() # 文章作者
publish_date = scrapy.Field() # 发布日期
publish_time = scrapy.Field() # 发布日期含时间
publish_from = scrapy.Field() # 文章来源
category = scrapy.Field() # 文章所属分类 report,
type = scrapy.Field() # 类型,图片(img)或者文字(txt)
html = scrapy.Field() # html内容
text = scrapy.Field() # 文本内容
image_urls = scrapy.Field() # 正文图片Url地址
images = scrapy.Field() # 正文图片本地地址
标签:样例,爬虫,publish,Field,scrapy,html,文章,国家统计局,图片 来源: https://blog.csdn.net/pengjunlee/article/details/104901014