|
|
@ -19,10 +19,10 @@ class Onion(object):
|
|
|
|
@url.setter
|
|
|
|
@url.setter
|
|
|
|
def url(self, domain):
|
|
|
|
def url(self, domain):
|
|
|
|
onion_pattern = re.compile(r'([a-z2-7]{16,56}\.onion)')
|
|
|
|
onion_pattern = re.compile(r'([a-z2-7]{16,56}\.onion)')
|
|
|
|
if onion_pattern.match(domain):
|
|
|
|
if onion_pattern.match(domain.lower()):
|
|
|
|
self._url = domain
|
|
|
|
self._url = domain.lower()
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
raise Exception("Onion domain pattern does not match")
|
|
|
|
raise Exception(f"'{domain.lower()}' domain pattern does not match onion pattern")
|
|
|
|
|
|
|
|
|
|
|
|
def set_operator(self, response):
|
|
|
|
def set_operator(self, response):
|
|
|
|
self.operators.update(response)
|
|
|
|
self.operators.update(response)
|
|
|
|