# Path: crawler/gather/items.py
# class ChannelItem(Item):
#     office_id = Field()
#     short = Field()
#     name = Field()
#     image = Field()
#     url = Field()
# 
# class RoomItem(Item):
#     office_id = Field()
#     name = Field()
#     image = Field()
#     url = Field()
#     online = Field()
#     host = Field()
#     channel = Field()
#     followers = Field()
#     description = Field()
#     announcement = Field()
#     start_time = Field()


from scrapy import Spider, Request
from ..items import ChannelItem, RoomItem
import json
# -*- coding: utf-8 -*-




class BilibiliSpider(Spider):
    name = 'bilibili'
    allowed_domains = ['bilibili.com']
    start_urls = [
        'http://live.bilibili.com/area/live'
    ]
    custom_settings = {
        'SITE': {
            'code': 'bilibili',
            'name': '哔哩哔哩',
            'description': '哔哩哔哩-关注ACG直播互动平台',
            'url': 'http://live.bilibili.com',

# Path: crawler/gather/items.py
# class ChannelItem(Item):
#     office_id = Field()
#     short = Field()
#     name = Field()
#     image = Field()
#     url = Field()
# 
# class RoomItem(Item):
#     office_id = Field()
#     name = Field()
#     image = Field()
#     url = Field()
#     online = Field()
#     host = Field()
#     channel = Field()
#     followers = Field()
#     description = Field()
#     announcement = Field()
#     start_time = Field()


# Path: crawler/gather/spiders/bilibili.py
from scrapy import Spider, Request
from ..items import ChannelItem, RoomItem
import json

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




class BilibiliSpider(Spider):
    name = 'bilibili'
    allowed_domains = ['bilibili.com']
    start_urls = [
        'http://live.bilibili.com/area/live'
    ]
    custom_settings = {
        'SITE': {
            'code': 'bilibili',
            'name': '哔哩哔哩',
            'description': '哔哩哔哩-关注ACG直播互动平台',
            'url': 'http://live.bilibili.com',

            'image': 'http://static.hdslb.com/live-static/common/images/logo/logo-150-cyan.png',