daijro / camoufox

🦊 Anti-detect browser
https://camoufox.com
Mozilla Public License 2.0
640 stars 49 forks source link

locale error #36

Closed satanmp closed 1 month ago

satanmp commented 1 month ago

Describe the bug:

Under the default settings, the following error is reported: (<class 'ValueError'>, ValueError("Invalid locale: 'zh_Hant-HK'. All locales must be in the format of language[-script][-region]"), <traceback object at 0x000002A537CB11C0>)

Screenshots:

图片

To Reproduce:

with Camoufox(headless=False, geoip=True,i_know_what_im_doing=True,
            config = {
                "fonts": get_random_font_name(),
                # "locale:language": "zh-CN,zh",
                # "navigator.userAgent": useragent,
            },
            humanize = True,
            os=('windows', 'macos', 'linux'),
            slow_mo=100, block_images=True,) as browser:
    context = browser.new_context()
    page = context.new_page()

Version:

beat.11

daijro commented 1 month ago

Fix has been added in the latest version of the python library.