# Path: fooltrader/items.py
# class SectorItem(scrapy.Item):
#     id = scrapy.Field()
#     start_date = scrapy.Field()
#     name = scrapy.Field()
#     link = scrapy.Field()
#     type = scrapy.Field()
#     producer = scrapy.Field()
#     news_title = scrapy.Field()
#     news_link = scrapy.Field()
#     count = scrapy.Field()
#     leadings = scrapy.Field()


import scrapy
from scrapy import Request
from scrapy.selector.unified import Selector
from fooltrader.consts import TONGHUASHUN_GN_HEADER
from fooltrader.items import SectorItem
# -*- coding: utf-8 -*-




class StockGNSpider(scrapy.Spider):
    name = "stock_gn_spider"
    custom_settings = {
        "ITEM_PIPELINES": {'fooltrader.pipelines.GetFilesPipeline': 1}}

    def start_requests(self):
        yield Request(
            url=self.get_gn_url(1),
            headers=TONGHUASHUN_GN_HEADER,
            meta={'index': 1},
            callback=self.parse_item)


# Path: fooltrader/items.py
# class SectorItem(scrapy.Item):
#     id = scrapy.Field()
#     start_date = scrapy.Field()
#     name = scrapy.Field()
#     link = scrapy.Field()
#     type = scrapy.Field()
#     producer = scrapy.Field()
#     news_title = scrapy.Field()
#     news_link = scrapy.Field()
#     count = scrapy.Field()
#     leadings = scrapy.Field()


# Path: fooltrader/spiders/deprecated/stock_gn_spider.py
import scrapy
from scrapy import Request
from scrapy.selector.unified import Selector
from fooltrader.consts import TONGHUASHUN_GN_HEADER
from fooltrader.items import SectorItem

# -*- coding: utf-8 -*-




class StockGNSpider(scrapy.Spider):
    name = "stock_gn_spider"
    custom_settings = {
        "ITEM_PIPELINES": {'fooltrader.pipelines.GetFilesPipeline': 1}}

    def start_requests(self):
        yield Request(
            url=self.get_gn_url(1),
            headers=TONGHUASHUN_GN_HEADER,
            meta={'index': 1},
            callback=self.parse_item)


    def parse_item(self, response):