From 97c877f27c97e71e5dcfc80616a916e08204b233 Mon Sep 17 00:00:00 2001 From: work Date: Thu, 9 Apr 2026 08:27:16 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=AC=E5=8F=91=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 | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/spider/task.py b/spider/task.py index 9283ae0..520334a 100644 --- a/spider/task.py +++ b/spider/task.py @@ -1212,9 +1212,19 @@ def playwright_share(cookies, target_url, content): 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()