import pandas as pd

df = pd.read_csv("http://mirror1.malwaredomains.com/files/domains.txt", sep='\t', skiprows=(0,1,2,3), error_bad_lines=False, header=None)

df['spamhaus'] = df.iloc[:, 4].str.contains("spamhaus")
df.loc[df['spamhaus'] == True].iloc[:, 2].to_csv("spam_malwaredomains_contain_spamhaus.csv")
