def __init__(self): #self.cursor = connect(DB) #self.table = get_table(DB, "mfw_mdd_country") self.table = connect_table("mfw.mdd.country") self.tables = { i: connect_table(i) for i in self.relation.values() }
def __init__(self): super(MddCitySpider, self).__init__() self.country_table = connect_table(MONGO_COUNTRY_TABLE) self.city_table = connect_table(MONGO_CITY_TABLE) cli = HotClient(host=REDIS_HOST, port=6379, password=REDIS_PASSWD) self.crawled_city = Set(client=cli, key=self.redis_crawled_key)
def __init__(self): super(MddMsShopSpider, self).__init__() self.city_table = connect_table(MONGO_CITY_TABLE) self.crawled_poiid = connect_table(MONGO_MS_SHOP_TABLE).distinct("poi_id")
def __init__(self): super(MddMsSpider, self).__init__() self.city_table = connect_table(MONGO_CITY_TABLE)
def __init__(self, *args, **kwargs): super(UserSpider, self).__init__(*args, **kwargs) table = connect_table(self.mongo_table) self.crawled_user_id = set(table.distinct("user_id"))