diff --git a/spider/task.py b/spider/task.py index 26d3b9b..3492037 100644 --- a/spider/task.py +++ b/spider/task.py @@ -330,11 +330,11 @@ def playwright_like(cookies, target_url): browser = playwright.chromium.launch( headless=False, args=['--start-maximized'], executable_path=path, - proxy={ - "server": "http://pr.oxylabs.io:7777", # 必填 - "username": f"customer-{username}-cc-{country}", - "password": password - } + # proxy={ + # "server": "http://pr.oxylabs.io:7777", # 必填 + # "username": f"customer-{username}-cc-{country}", + # "password": password + # } ) context = browser.new_context(no_viewport=True) @@ -610,11 +610,11 @@ def playwright_comment(cookies, target_url, content, image_key=None): browser = playwright.chromium.launch( headless=False, args=['--start-maximized'], executable_path=path, - proxy={ - "server": "http://pr.oxylabs.io:7777", # 必填 - "username": f"customer-{username}-cc-{country}", - "password": password - } + # proxy={ + # "server": "http://pr.oxylabs.io:7777", # 必填 + # "username": f"customer-{username}-cc-{country}", + # "password": password + # } ) context = browser.new_context(no_viewport=True) @@ -691,11 +691,11 @@ def playwright_get_user_profile(cookies, username=None): browser = playwright.chromium.launch( headless=const.HEADLESS, args=['--start-maximized'], executable_path=path, - proxy={ - "server": "http://pr.oxylabs.io:7777", # 必填 - "username": f"customer-{username}-cc-{country}", - "password": password - } + # proxy={ + # "server": "http://pr.oxylabs.io:7777", # 必填 + # "username": f"customer-{username}-cc-{country}", + # "password": password + # } ) context = browser.new_context(no_viewport=True) context.add_cookies(parse_cookies(cookies)) @@ -1101,11 +1101,11 @@ def playwright_m_login(username, password, code_2fa=None): browser = playwright.chromium.launch( headless=const.HEADLESS, args=['--start-maximized'], executable_path=path, - proxy={ - "server": "http://pr.oxylabs.io:7777", # 必填 - "username": f"customer-{username}-cc-{country}", - "password": password - } + # proxy={ + # "server": "http://pr.oxylabs.io:7777", # 必填 + # "username": f"customer-{username}-cc-{country}", + # "password": password + # } ) # random_user_agent = UserAgent().getBrowser(["Chrome Mobile iOS"]).get("useragent") random_user_agent = "Mozilla/5.0 (Linux; Android 12; Pixel 6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.41 Mobile Safari/537.36"