Extracting features from URLs to build a data set for machine learning. The purpose is to find a machine learning model to predict phishing URLs, which are targeted to the Brazilian population.
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2800.0_x64__qbz5n2kfra8p0\lib\sre_parse.py", line 1039, in parse_template
this = chr(ESCAPES[this][1])
KeyError: '\s'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\ajstr\Feature extraction development\url-feature-extractor\run.py", line 3, in
import extract
File "C:\Users\ajstr\Feature extraction development\url-feature-extractor\extract.py", line 1, in
from lib.functions import
File "C:\Users\ajstr\Feature extraction development\url-feature-extractor\lib\functions.py", line 9, in
import pythonwhois
File "C:\Users\ajstr\Feature extraction development\url-feature-extractor\pythonwhois__init__.py", line 1, in
from . import net, parse
File "C:\Users\ajstr\Feature extraction development\url-feature-extractor\pythonwhois\parse.py", line 365, in
registrant_regexes = [preprocess_regex(regex) for regex in registrant_regexes]
File "C:\Users\ajstr\Feature extraction development\url-feature-extractor\pythonwhois\parse.py", line 365, in
registrant_regexes = [preprocess_regex(regex) for regex in registrant_regexes]
File "C:\Users\ajstr\Feature extraction development\url-feature-extractor\pythonwhois\parse.py", line 207, in preprocess_regex
regex = re.sub(r"\s*(\?P<([^>]+)>.+)", r"\s(?P<\1>\S.*)", regex)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2800.0_x64qbz5n2kfra8p0\lib\re.py", line 210, in sub
return _compile(pattern, flags).sub(repl, string, count)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2800.0_x64__qbz5n2kfra8p0\lib\re.py", line 327, in _subx
template = _compile_repl(template, pattern)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2800.0_x64qbz5n2kfra8p0\lib\re.py", line 318, in _compile_repl
return sre_parse.parse_template(repl, pattern)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2800.0_x64__qbz5n2kfra8p0\lib\sre_parse.py", line 1042, in parse_template
raise s.error('bad escape %s' % this, len(this))
re.error: bad escape \s at position 0
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2800.0_x64__qbz5n2kfra8p0\lib\sre_parse.py", line 1039, in parse_template this = chr(ESCAPES[this][1]) KeyError: '\s'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\ajstr\Feature extraction development\url-feature-extractor\run.py", line 3, in
import extract
File "C:\Users\ajstr\Feature extraction development\url-feature-extractor\extract.py", line 1, in
from lib.functions import
File "C:\Users\ajstr\Feature extraction development\url-feature-extractor\lib\functions.py", line 9, in
import pythonwhois
File "C:\Users\ajstr\Feature extraction development\url-feature-extractor\pythonwhois__init__.py", line 1, in
from . import net, parse
File "C:\Users\ajstr\Feature extraction development\url-feature-extractor\pythonwhois\parse.py", line 365, in
registrant_regexes = [preprocess_regex(regex) for regex in registrant_regexes]
File "C:\Users\ajstr\Feature extraction development\url-feature-extractor\pythonwhois\parse.py", line 365, in
registrant_regexes = [preprocess_regex(regex) for regex in registrant_regexes]
File "C:\Users\ajstr\Feature extraction development\url-feature-extractor\pythonwhois\parse.py", line 207, in preprocess_regex
regex = re.sub(r"\s*(\?P<([^>]+)>.+)", r"\s (?P<\1>\S.*)", regex)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2800.0_x64qbz5n2kfra8p0\lib\re.py", line 210, in sub
return _compile(pattern, flags).sub(repl, string, count)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2800.0_x64__qbz5n2kfra8p0\lib\re.py", line 327, in _subx
template = _compile_repl(template, pattern)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2800.0_x64qbz5n2kfra8p0\lib\re.py", line 318, in _compile_repl
return sre_parse.parse_template(repl, pattern)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2800.0_x64__qbz5n2kfra8p0\lib\sre_parse.py", line 1042, in parse_template
raise s.error('bad escape %s' % this, len(this))
re.error: bad escape \s at position 0
This error is returned at run time