setting.py 2.2 KB

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