setting.py 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. # -*- coding: utf-8 -*-
  2. """
  3. -------------------------------------------------
  4. File Name: setting.py
  5. Description : 配置文件
  6. Author : JHao
  7. date: 2019/2/15
  8. -------------------------------------------------
  9. Change Activity:
  10. 2019/2/15:
  11. -------------------------------------------------
  12. """
  13. BANNER = r"""
  14. ****************************************************************
  15. *** ______ ********************* ______ *********** _ ********
  16. *** | ___ \_ ******************** | ___ \ ********* | | ********
  17. *** | |_/ / \__ __ __ _ __ _ | |_/ /___ * ___ | | ********
  18. *** | __/| _// _ \ \ \/ /| | | || __// _ \ / _ \ | | ********
  19. *** | | | | | (_) | > < \ |_| || | | (_) | (_) || |___ ****
  20. *** \_| |_| \___/ /_/\_\ \__ |\_| \___/ \___/ \_____/ ****
  21. **** __ / / *****
  22. ************************* /___ / *******************************
  23. ************************* ********************************
  24. ****************************************************************
  25. """
  26. SHOW_CONFIG = True # print key config
  27. # ############### server config ###############
  28. HOST = "0.0.0.0"
  29. PORT = 5000
  30. # ############### db config ###################
  31. # db connection uri
  32. # example:
  33. # Redis: redis://:password@ip:port/db
  34. # Ssdb: ssdb://:password@ip:port
  35. DB_CONN = 'redis://:_@Fintell@10.10.61.65:6379'
  36. # raw proxy db
  37. RAW_PROXY = 'raw_proxy'
  38. # useful proxy db
  39. USE_PROXY = 'use_proxy'
  40. # ###### config the proxy fetch function ######
  41. PROXY_FETCHER = [
  42. "freeProxy01",
  43. # "freeProxy02",
  44. "freeProxy03",
  45. "freeProxy04",
  46. "freeProxy05",
  47. # "freeProxy06",
  48. "freeProxy07",
  49. # "freeProxy08",
  50. "freeProxy09",
  51. "freeProxy13",
  52. "freeProxy14",
  53. "freeProxy15",
  54. ]
  55. # ############# proxy validator #################
  56. VERIFY_RUL = "http://www.baidu.com"
  57. VERIFY_TIMEOUT = 10
  58. MAX_FAIL_COUNT = 0