diff --git a/app/utils/common.py b/app/utils/common.py index 2b2655f..14d9dfa 100644 --- a/app/utils/common.py +++ b/app/utils/common.py @@ -1,6 +1,8 @@ import hashlib import random +from app.config.config import AppCtx + def md5(s: str) -> str: m = hashlib.md5() @@ -9,17 +11,24 @@ def md5(s: str) -> str: def get_proxies(): - username = "t14131310374591" - password = "qg6xwmrq" - tunnel = "d432.kdltps.com:15818" - proxies = { - "http": "http://%(user)s:%(pwd)s@%(proxy)s/" % {"user": username, "pwd": password, "proxy": tunnel}, - "https": "http://%(user)s:%(pwd)s@%(proxy)s/" % {"user": username, "pwd": password, "proxy": tunnel} - } + # username = "t14131310374591" + # password = "qg6xwmrq" + # tunnel = "d432.kdltps.com:15818" + # proxies = { + # "http": "http://%(user)s:%(pwd)s@%(proxy)s/" % {"user": username, "pwd": password, "proxy": tunnel}, + # "https": "http://%(user)s:%(pwd)s@%(proxy)s/" % {"user": username, "pwd": password, "proxy": tunnel} + # } # proxies = { # "http": "http://127.0.0.1:8080", # "https": "http://127.0.0.1:8080" # } + + proxy = AppCtx.g_app_config.chrome.proxy + proxies = { + "http": proxy, + "https": proxy + } + return proxies