Created
June 26, 2020 21:16
-
-
Save jatrost/38297ded8bc286fed25e6813ed41d472 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tldextract | |
import sys | |
for line in sys.stdin: | |
try: | |
sld = tldextract.extract(line.strip()).registered_domain | |
if sld: | |
print(sld) | |
except: | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment