setting.py 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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 config
  27. # ############### server config ###############
  28. HOST = "0.0.0.0"
  29. PORT = 5010
  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://:pwd@127.0.0.1:6379/0'
  36. # proxy table name
  37. TABLE_NAME = 'use_proxy'
  38. # ###### config the proxy fetch function ######
  39. PROXY_FETCHER = [
  40. "freeProxy01",
  41. # "freeProxy02",
  42. # "freeProxy03",
  43. "freeProxy04",
  44. "freeProxy05",
  45. # "freeProxy06",
  46. "freeProxy07",
  47. # "freeProxy08",
  48. "freeProxy09",
  49. "freeProxy13",
  50. "freeProxy14",
  51. "freeProxy15",
  52. ]
  53. # ############# proxy validator #################
  54. VERIFY_URL = "http://www.baidu.com"
  55. VERIFY_TIMEOUT = 10
  56. MAX_FAIL_COUNT = 0
  57. # ############# scheduler config #################
  58. # Set the timezone for the scheduler forcely (optional)
  59. # If it is running on a VM, and
  60. # "ValueError: Timezone offset does not match system offset"
  61. # was raised during scheduling.
  62. # Please uncomment the following line and set a timezone for the scheduler.
  63. # Otherwise it will detect the timezone from the system automatically.
  64. # TIMEZONE = "Asia/Shanghai"