From 7bbaf8499dadc8ad7ec1108069a065f7d9d40def Mon Sep 17 00:00:00 2001 From: work Date: Wed, 8 Apr 2026 14:31:08 +0800 Subject: [PATCH] =?UTF-8?q?=E7=82=B9=E8=B5=9E=E4=BD=BF=E7=94=A8=E4=BB=A3?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spider/task.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/spider/task.py b/spider/task.py index 7f2e3de..1cb7546 100644 --- a/spider/task.py +++ b/spider/task.py @@ -299,10 +299,19 @@ def playwright_like(cookies, target_url): with lock: with sync_playwright() as playwright: update_windows_distinguish() + username = 'moremore_51WM1' + password = 'TOv5y0nXCZH_JH+5' + country = 'US' browser = playwright.chromium.launch( - headless=False, args=['--start-maximized'], executable_path=path + headless=False, args=['--start-maximized'], executable_path=path, + 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)) page = context.new_page()