点赞,评论,转发不使用代理了
This commit is contained in:
@@ -203,13 +203,8 @@ def playwright_like(cookies, target_url):
|
|||||||
with sync_playwright() as playwright:
|
with sync_playwright() as playwright:
|
||||||
update_windows_distinguish()
|
update_windows_distinguish()
|
||||||
|
|
||||||
proxy_url = get_proxy_from_api()
|
|
||||||
logger.info(f"使用proxi={proxy_url}")
|
|
||||||
|
|
||||||
browser = playwright.chromium.launch(
|
browser = playwright.chromium.launch(
|
||||||
headless=False, args=['--start-maximized'], executable_path=path, proxy={
|
headless=False, args=['--start-maximized'], executable_path=path
|
||||||
"server": proxy_url,
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
context = browser.new_context(no_viewport=True)
|
context = browser.new_context(no_viewport=True)
|
||||||
context.add_cookies(parse_cookies(cookies))
|
context.add_cookies(parse_cookies(cookies))
|
||||||
@@ -409,13 +404,8 @@ def playwright_comment(cookies, target_url, content, image_key=None):
|
|||||||
with sync_playwright() as playwright:
|
with sync_playwright() as playwright:
|
||||||
update_windows_distinguish()
|
update_windows_distinguish()
|
||||||
|
|
||||||
proxy_url = get_proxy_from_api()
|
|
||||||
logger.info(f"使用proxi={proxy_url}")
|
|
||||||
|
|
||||||
browser = playwright.chromium.launch(
|
browser = playwright.chromium.launch(
|
||||||
headless=False, args=['--start-maximized'], executable_path=path, proxy={
|
headless=False, args=['--start-maximized'], executable_path=path
|
||||||
"server": proxy_url,
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
context = browser.new_context(no_viewport=True)
|
context = browser.new_context(no_viewport=True)
|
||||||
context.add_cookies(parse_cookies(cookies))
|
context.add_cookies(parse_cookies(cookies))
|
||||||
@@ -908,13 +898,8 @@ def playwright_share(cookies, target_url, content):
|
|||||||
with sync_playwright() as playwright:
|
with sync_playwright() as playwright:
|
||||||
update_windows_distinguish()
|
update_windows_distinguish()
|
||||||
|
|
||||||
proxy_url = get_proxy_from_api()
|
|
||||||
logger.info(f"使用proxi={proxy_url}")
|
|
||||||
|
|
||||||
browser = playwright.chromium.launch(
|
browser = playwright.chromium.launch(
|
||||||
headless=False, args=['--start-maximized'], executable_path=path, proxy={
|
headless=False, args=['--start-maximized'], executable_path=path
|
||||||
"server": proxy_url,
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
context = browser.new_context(no_viewport=True)
|
context = browser.new_context(no_viewport=True)
|
||||||
context.add_cookies(parse_cookies(cookies))
|
context.add_cookies(parse_cookies(cookies))
|
||||||
|
|||||||
Reference in New Issue
Block a user