Ejemplo n.º 1
0
    def __init__(self):
        ProcesserBase.__init__(self)
        self.db = pymongo.Connection("192.168.2.229", 2291).dcrawler_final

        self.solr = pysolr.Solr('http://192.168.2.233:1984/solr/', timeout=10)
        self.helper = PushIndexHelper()
        self.ipusher = pusher()
Ejemplo n.º 2
0
    def __init__(self):
        ProcesserBase.__init__(self)
        self.db = pymongo.Connection("192.168.2.229", 2291).dcrawler_final

        self.solr = pysolr.Solr('http://192.168.2.233:1984/solr/', timeout=10)
        self.helper = PushIndexHelper()
        self.ipusher = pusher()
Ejemplo n.º 3
0
 def __init__(self):
     ProcesserBase.__init__(self)
     mongodb_host = '192.168.2.229'
     mongodb_dbname = 'dcrawler_final'
     conn = pymongo.Connection(mongodb_host, 2291)
     self.db = conn[mongodb_dbname]
     self.data_queues = []  #data queues preparing index
Ejemplo n.º 4
0
 def __init__(self):
     ProcesserBase.__init__(self)
     self.rdb3 = redis.Redis(host='122.192.66.45', db=3)
     # 查询远程图片信息的thrift客户端
     self.remoteImagedb = imagedb()
     # 推送索引
     self.ipusher = pusher()
Ejemplo n.º 5
0
 def __init__(self):
     ProcesserBase.__init__(self)
     self.rdb3 = redis.Redis(host='122.192.66.45', db=3)
     # 查询远程图片信息的thrift客户端
     self.remoteImagedb = imagedb()
     # 推送索引
     self.ipusher = pusher()
Ejemplo n.º 6
0
 def __init__(self):
     ProcesserBase.__init__(self) 
     mongodb_host = '192.168.2.229'
     mongodb_dbname = 'dcrawler_final'
     conn = pymongo.Connection(mongodb_host,2291)
     self.db = conn[mongodb_dbname]
     self.data_queues = [] #data queues preparing index
Ejemplo n.º 7
0
    def __init__(self):
        ProcesserBase.__init__(self)
        # 远程图片队列
        redis_host = '122.192.66.45'
        redis_port = 6379

        self.server_img = redis.Redis(redis_host, redis_port, 1)
        self.server_img3 = redis.Redis(redis_host, redis_port, 3)
        conn229 = pymongo.Connection('192.168.2.229',2291)
        self.db = conn229['dcrawler_final']

        # 查询远程图片信息的thrift客户端
        self.remoteImagedb = imagedb()
Ejemplo n.º 8
0
    def __init__(self):
        ProcesserBase.__init__(self)
        # 远程图片队列
        redis_host = '122.192.66.45'
        redis_port = 6379

        self.server_img = redis.Redis(redis_host, redis_port, 1)
        self.server_img3 = redis.Redis(redis_host, redis_port, 3)
        conn229 = pymongo.Connection('192.168.2.229', 2291)
        self.db = conn229['dcrawler_final']

        # 查询远程图片信息的thrift客户端
        self.remoteImagedb = imagedb()
Ejemplo n.º 9
0
    def __init__(self):
        ProcesserBase.__init__(self) 

        self.cars = CarSpecification()
        self.seg_rule = [
            ("series_num_zh", u"(\d{2,4}).+[年款]?", 1),
            ("logo_zh", u"[\u2E80-\u9FFF]+[版型级]", 0),
            #("transmission_zh", u"(手动)|(自动)|(手波)|(手自一体)|(无极变速)|(双离合)", 0),
            #("transmission", u"([AM]T)|(A[^T]+T)|CVT|GSG", 0),
            ("engine", u"(\d\.\d?)(?![\d|万])(L|l|T|t|升|TSI|FSI|TFSI)?", 1),
            ("imports_zh", u"(进口)|(国产)|([\u2E80-\u9FFF]+)国", 0)]

        self.rule1 = [("car_type", "pattern_zh", 0.1, 'str'),
                      ("car_brand", "brand", 0.2, 'str'),
                      ("car_series", "series", 0.2, 'str'),
                      ("car_emission", "engine", 0.08, 'abs'),
                      ("car_transmission", "transmission_zh", 0.04, 'str'),
                      ("car_title", "logo_zh", 0.1, 'str'),
                      ("car_title", "pattern_zh", 0.13, 'str'),
                      ("car_title", "series_num_zh", 0.1, 'str'),
                      ("car_description", "pattern_zh", 0.023, 'str'),
                      ("car_birth", "producted_year", 0.03, 'str'),
                      ("purchase_price_refer", "indicative_price", 0.024, 'num'),]
Ejemplo n.º 10
0
 def __init__(self):
     ProcesserBase.__init__(self)
Ejemplo n.º 11
0
 def __init__(self):
     ProcesserBase.__init__(self)
Ejemplo n.º 12
0
 def __init__(self):
     ProcesserBase.__init__(self) 
     self.mydict =  CarSpecification()       
Ejemplo n.º 13
0
 def __init__(self):
     ProcesserBase.__init__(self)
     redis_host = '192.168.2.219'  # change later
     redis_port = 6379
     redis_db = 4
     self.server = redis.Redis(redis_host, redis_port, redis_db)
Ejemplo n.º 14
0
 def __init__(self):
     ProcesserBase.__init__(self) 
     redis_host = '192.168.2.219'  # change later
     redis_port = 6379
     redis_db = 4
     self.server = redis.Redis(redis_host, redis_port, redis_db)
Ejemplo n.º 15
0
 def __init__(self):
     ProcesserBase.__init__(self)   
     redis_host = '192.168.2.228'
     redis_port = 6381
     self.rd7 = redis.Redis(redis_host, redis_port, db=7)
Ejemplo n.º 16
0
 def __init__(self):
     ProcesserBase.__init__(self)
     redis_host = '192.168.2.228'
     redis_port = 6381
     self.rd7 = redis.Redis(redis_host, redis_port, db=7)