Last active
February 11, 2020 23:35
-
-
Save kylekyle/2eb48337ff953a74534607642fd5e296 to your computer and use it in GitHub Desktop.
urllib parsing
This file contains 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 pandas as pd | |
from urllib.parse import urlparse | |
df = pd.read_csv("onions.txt", names=["domain"]) | |
df[df["domain"].apply(lambda x: urlparse("http://"+x).netloc).duplicated(keep=False) == True] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment