通过Scrapy爬取某影视项目,共爬取二十多个数据字段,数据存储于redis,转存mysql。
name = scrapy.Field() # 标题
other_name = scrapy.Field() # 别名
rank = scrapy.Field() # 评分
director = scrapy.Field() # 导演
stars = scrapy.Field() # 主演
cate = scrapy.Field(
output_processor=MapCompose(cate_handler)
) # 类型
region = scrapy.Field() # 地区
lang = scrapy.Field() # 语言
show_time = scrapy.Field() # 上映时间
film_time = scrapy.Field() # 时长
update_time = scrapy.Field() # 更新时间
recommend = scrapy.Field() # 介绍
url = scrapy.Field() # 链接
play_type1 = scrapy.Field() # 播放方式1
play_type2 = scrapy.Field() # 播放方式2
download_1 = scrapy.Field() # 下载方式1