Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

extract domain name from url python

from urllib.parse import urlparse

domain = urlparse('http://www.example.test/foo/bar').netloc
print(domain) # --> www.example.test
 
PREVIOUS NEXT
Tagged: #extract #domain #url #python
ADD COMMENT
Topic
Name
9+6 =