# Buggy code
def configure(config):
    """
    | name | example | purpose |
    | ---- | ------- | ------- |
    | enabled\\_by\\_default | True | Enable URL safety in all channels where it isn't explicitly disabled. |
    | known\\_good | sopel.chat,dftba.net | List of "known good" domains to ignore. |
    | vt\\_api\\_key | 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef | Optional VirusTotal API key to improve malicious URL detection |
    """
    config.define_section("safety", SafetySection)
    config.safety.configure_setting(
        "enabled_by_default",
        "Enable URL safety in channels that don't specifically disable it?",
    )
    config.safety.configure_setting(
        "known_good",
        "Enter any domains to whitelist",
    )
    config.safety.configure_setting(
        "vt_api_key",
        "Optionally, enter a VirusTotal API key to improve malicious URL "
        "protection.\nOtherwise, only the Malwarebytes DB will be used.",
    )


# Traceback (urllib.error.HTTPError)
[2020-12-22 13:35:56,136] sopel.modules.safety INFO     - Downloading malwaredomains db from https://mirror1.malwaredomains.com/files/justdomains
[2020-12-22 13:35:56,332] sopel.bot            ERROR    - Error in safety setup: HTTP Error 404: Not Found
Traceback (most recent call last):
File "/mnt/c/Users/dgw/github/sopel/sopel/bot.py", line 310, in setup_plugins
plugin.setup(self)
File "/mnt/c/Users/dgw/github/sopel/sopel/plugins/handlers.py", line 265, in setup
self._module.setup(bot)
File "/mnt/c/Users/dgw/github/sopel/sopel/modules/safety.py", line 98, in setup
_download_malwaredomains_db(loc)
File "/mnt/c/Users/dgw/github/sopel/sopel/modules/safety.py", line 116, in _download_malwaredomains_db
urlretrieve(url, path)
File "/usr/lib/python3.6/urllib/request.py", line 248, in urlretrieve
with contextlib.closing(urlopen(url, data)) as fp:
File "/usr/lib/python3.6/urllib/request.py", line 223, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.6/urllib/request.py", line 532, in open
response = meth(req, response)
File "/usr/lib/python3.6/urllib/request.py", line 642, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python3.6/urllib/request.py", line 570, in error
return self._call_chain(*args)
File "/usr/lib/python3.6/urllib/request.py", line 504, in _call_chain
result = func(*args)
File "/usr/lib/python3.6/urllib/request.py", line 650, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found

# Fixed code
def configure(config):
    """
    | name | example | purpose |
    | ---- | ------- | ------- |
    | enabled\\_by\\_default | True | Enable URL safety in all channels where it isn't explicitly disabled. |
    | known\\_good | sopel.chat,dftba.net | List of "known good" domains to ignore. |
    | vt\\_api\\_key | 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef | Optional VirusTotal API key to improve malicious URL detection |
    """
    config.define_section("safety", SafetySection)
    config.safety.configure_setting(
        "enabled_by_default",
        "Enable URL safety in channels that don't specifically disable it?",
    )
    config.safety.configure_setting(
        "known_good",
        "Enter any domains to whitelist",
    )
    config.safety.configure_setting(
        "vt_api_key",
        "Optionally, enter a VirusTotal API key to improve malicious URL "
        "protection.\nOtherwise, only the StevenBlack list will be used.",
    )