constants.py 574 B

12345678910111213141516171819202122232425
  1. from common.databases import mongo_table, redis_client
  2. from crawler.bloom_filter import RedisBloomFilter
  3. __all__ = [
  4. 'MGO_VISIT',
  5. 'RBF',
  6. 'REDIS',
  7. 'DEFAULT_QUERY',
  8. ]
  9. '''搜索关键词组与域名的集合表'''
  10. MGO_VISIT = mongo_table('shujuziyuan', 'visit')
  11. '''判重库'''
  12. MGO_FILTER = mongo_table(
  13. host='192.168.3.167',
  14. port='27082',
  15. db='shujuziyuan',
  16. name='repetition_url'
  17. )
  18. '''redis'''
  19. REDIS = redis_client()
  20. '''redis布隆过滤器'''
  21. RBF = RedisBloomFilter()
  22. RBF.start(1000000000, 0.00001)
  23. '''详情采集标识'''
  24. DEFAULT_QUERY = {}