88 lines
2.1 KiB
Python
88 lines
2.1 KiB
Python
# -*- coding: utf-8 -*-
|
|
|
|
# Define here the models for your scraped items
|
|
#
|
|
# See documentation in:
|
|
# https://doc.scrapy.org/en/latest/topics/items.html
|
|
|
|
import scrapy
|
|
|
|
|
|
class ZhihuItem(scrapy.Item):
|
|
# define the fields for your item here like:
|
|
# name = scrapy.Field()
|
|
pass
|
|
|
|
class ProductSpecItem(scrapy.Item):
|
|
pid = scrapy.Field()
|
|
cpu = scrapy.Field()
|
|
rom = scrapy.Field()
|
|
ram = scrapy.Field()
|
|
resolution = scrapy.Field()
|
|
charge = scrapy.Field()
|
|
weight = scrapy.Field()
|
|
brand = scrapy.Field()
|
|
|
|
class ProxyItem(scrapy.Item):
|
|
ip = scrapy.Field()
|
|
port = scrapy.Field()
|
|
address = scrapy.Field()
|
|
http = scrapy.Field()
|
|
fast = scrapy.Field()
|
|
alive = scrapy.Field()
|
|
checktime = scrapy.Field()
|
|
|
|
class ProductItem(scrapy.Item):
|
|
id = scrapy.Field()
|
|
img = scrapy.Field()
|
|
title = scrapy.Field()
|
|
price = scrapy.Field()
|
|
author = scrapy.Field()
|
|
shop = scrapy.Field()
|
|
pubtime = scrapy.Field()
|
|
publisher = scrapy.Field()
|
|
url = scrapy.Field()
|
|
detail = scrapy.Field()
|
|
comment_num = scrapy.Field()
|
|
|
|
|
|
class CommentItem(scrapy.Item):
|
|
id = scrapy.Field()
|
|
total_comment_num = scrapy.Field()
|
|
total_crazy_count = scrapy.Field()
|
|
total_indifferent_count = scrapy.Field()
|
|
total_detest_count = scrapy.Field()
|
|
page_count = scrapy.Field()
|
|
comments = scrapy.Field()
|
|
|
|
|
|
class JDProductItem(scrapy.Item):
|
|
id = scrapy.Field()
|
|
type = scrapy.Field()
|
|
name = scrapy.Field()
|
|
price = scrapy.Field()
|
|
url = scrapy.Field()
|
|
img = scrapy.Field()
|
|
shop = scrapy.Field()
|
|
comment_num = scrapy.Field()
|
|
created_at = scrapy.Field()
|
|
|
|
|
|
class JDCommentItem(scrapy.Item):
|
|
id = scrapy.Field()
|
|
user_name = scrapy.Field()
|
|
from_type = scrapy.Field()
|
|
content = scrapy.Field()
|
|
comment_time = scrapy.Field()
|
|
created_at = scrapy.Field()
|
|
|
|
|
|
class JDCommentSummary(scrapy.Item):
|
|
id = scrapy.Field()
|
|
good_count = scrapy.Field()
|
|
general_count = scrapy.Field()
|
|
poor_count = scrapy.Field()
|
|
comment_count = scrapy.Field()
|
|
default_good_count = scrapy.Field()
|
|
good_rate = scrapy.Field()
|