g1879 38dcc88dfa 3.2.35修复问题(详)
tabs属性忽略隐私声明
修复 8x 版浏览器选择下拉列表时报错问题
修复某些情况下下拉框不触发联动的问题
修复配置文件损坏时出现的问题
修复get()方法url含某些特殊字符时连接失败的问题
2023-11-30 14:48:50 +08:00

29 lines
924 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from click import command, option
from ..chromium_page import ChromiumPage
from ..easy_set import set_paths, configs_to_here as ch
@command()
@option("-p", "--set-browser-path", help="设置浏览器路径")
@option("-u", "--set-user-path", help="设置用户数据路径")
@option("-c", "--configs-to-here", is_flag=True, help="复制默认配置文件到当前路径")
@option("-l", "--launch-browser", default=-1, help="启动浏览器传入端口号0表示用配置文件中的值")
def main(set_browser_path, set_user_path, configs_to_here, launch_browser):
if set_browser_path:
set_paths(browser_path=set_browser_path)
if set_user_path:
set_paths(user_data_path=set_user_path)
if configs_to_here:
ch()
if launch_browser >= 0:
port = f'127.0.0.1:{launch_browser}' if launch_browser else None
ChromiumPage(port)
if __name__ == '__main__':
main()