refactor: extract extract_domain function
This commit is contained in:
parent
3648dc212c
commit
1c81ca300f
3 changed files with 42 additions and 8 deletions
|
|
@ -1,3 +1,5 @@
|
|||
from urllib.parse import urlparse
|
||||
|
||||
from bech32 import bech32_decode, convertbits
|
||||
|
||||
|
||||
|
|
@ -17,3 +19,6 @@ def normalize_public_key(pubkey: str) -> str:
|
|||
raise ValueError("Public Key is not valid hex")
|
||||
int(pubkey, 16)
|
||||
return pubkey
|
||||
|
||||
def extract_domain(url: str) -> str:
|
||||
return urlparse(url).netloc
|
||||
Loading…
Add table
Add a link
Reference in a new issue