We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hello,可以出一个python的api接口吗,python传入一个指纹,直接打开对应环境的浏览器这种
The text was updated successfully, but these errors were encountered:
+1,手动太不方便了
Sorry, something went wrong.
下面的代码,打不开页面,问题在哪里
import os from playwright.sync_api import sync_playwright # 需要先手动创建 worker-id 目录(已手动创建) worker_id = 1 # VirtualBrowser 安装路径 virtual_browser_path = "C:/Program Files/VirtualBrowser/VirtualBrowser.exe" # 启动浏览器的用户数据目录路径 user_data_dir = os.path.join( os.getenv("LOCALAPPDATA"), "VirtualBrowser", "Workers", str(worker_id) ) with sync_playwright() as p: browser = p.chromium.launch_persistent_context( user_data_dir, executable_path=virtual_browser_path, # 配置 VirtualBrowser 安装路径 args=[f"--worker-id={worker_id}"], headless=False, # 非无头模式 viewport=None, # 默认视图为全屏 ) # 打开新页面 page = browser.new_page() page.goto("https://example.com") # 替换为你的目标 URL # 在这里添加你的操作,例如截图或抓取内容 print(page.title()) # 关闭浏览器 browser.close()
No branches or pull requests
hello,可以出一个python的api接口吗,python传入一个指纹,直接打开对应环境的浏览器这种
The text was updated successfully, but these errors were encountered: