Expected behavior or error-message
A clear and concise description of what you expected to happen.
# error-message
File "/Users/xfdai/PycharmProjects/Selenium-Profiles/src/selenium_profiles/webdriver.py", line 156, in init
self.profiles.cdp_handler.apply(cdp_profile=profile["cdp"])
File "/Users/xfdai/PycharmProjects/Selenium-Profiles/src/selenium_profiles/scripts/profiles.py", line 40, in apply
useragent = self.set_useragent(profile["useragent"], patch_version=profile["patch_version"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/xfdai/PycharmProjects/Selenium-Profiles/src/selenium_profiles/scripts/profiles.py", line 78, in set_useragent
useragent = self.patch_version(useragent_profile=useragent, version=patch_version, driver=self._driver)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/xfdai/PycharmProjects/Selenium-Profiles/src/selenium_profiles/scripts/profiles.py", line 118, in patch_version
if not re.match(brands_pattern, brand["brand"]):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/re/init.py", line 166, in match
return _compile(pattern, flags).match(string)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/re/init.py", line 294, in _compile
p = _compiler.compile(pattern, flags)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/re/_compiler.py", line 743, in compile
p = _parser.parse(p, flags)
^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/re/_parser.py", line 980, in parse
p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/re/_parser.py", line 455, in _parse_sub
itemsappend(_parse(source, state, verbose, nested + 1,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/re/_parser.py", line 612, in _parse
raise source.error(msg, len(this) + 1 + len(that))
re.error: bad character range :-. at position 7
Environment (please complete the following information):
OS: [e.g. Windows, Google-Colab ]
OS-Version [e.g. 10]
Browser [e.g. Google-Chrome, Chromium]
Selenium-Profiles Version [e.g. 2.2.5.1]
Additional context
Add any other context about the problem here.
Describe the bug A clear and concise description of what the bug is.
To Reproduce
original code from script\profiles.py brandspattern = r'^Not[ (:-./);=?]A[ (:-./);=?_]Brand$'
brandspattern = r'^Not[ (:./);=?]A[ (:./);=?_]Brand$'
Expected behavior or error-message A clear and concise description of what you expected to happen.
File "/Users/xfdai/PycharmProjects/Selenium-Profiles/src/selenium_profiles/webdriver.py", line 156, in init self.profiles.cdp_handler.apply(cdp_profile=profile["cdp"]) File "/Users/xfdai/PycharmProjects/Selenium-Profiles/src/selenium_profiles/scripts/profiles.py", line 40, in apply useragent = self.set_useragent(profile["useragent"], patch_version=profile["patch_version"]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/xfdai/PycharmProjects/Selenium-Profiles/src/selenium_profiles/scripts/profiles.py", line 78, in set_useragent useragent = self.patch_version(useragent_profile=useragent, version=patch_version, driver=self._driver) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/xfdai/PycharmProjects/Selenium-Profiles/src/selenium_profiles/scripts/profiles.py", line 118, in patch_version if not re.match(brands_pattern, brand["brand"]): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/re/init.py", line 166, in match return _compile(pattern, flags).match(string) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/re/init.py", line 294, in _compile p = _compiler.compile(pattern, flags) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/re/_compiler.py", line 743, in compile p = _parser.parse(p, flags) ^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/re/_parser.py", line 980, in parse p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/re/_parser.py", line 455, in _parse_sub itemsappend(_parse(source, state, verbose, nested + 1, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/re/_parser.py", line 612, in _parse raise source.error(msg, len(this) + 1 + len(that)) re.error: bad character range :-. at position 7
Environment (please complete the following information):
Additional context Add any other context about the problem here.