Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def GET(self): # pylint: disable=invalid-name,no-self-use
web.header('Content-Type', 'text/html; charset=utf-8')
return '<br>'.join(sorted(tldextract.tldextract.TLD_EXTRACTOR.tlds))
def add_domain_handler(self):
import re
from tldextract.tldextract import TLD_EXTRACTOR
valid_re = re.compile("^[a-zA-Z.]+$")
tlds = ["." + x for x in TLD_EXTRACTOR.tlds if valid_re.match(x)]
for x in tlds:
self.add(x, x, "Added by domain handler, keeps the token existing.")