Created
October 9, 2014 16:42
-
-
Save kanazux/25f40c33a6f938abcea2 to your computer and use it in GitHub Desktop.
remove tag html, chack ip on blacklist
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
#!/usr/local/bin/python | |
import sys, re | |
from urllib2 import urlopen | |
print ''.join([ re.sub(r'<[^>]+>','',x) for x in urlopen('http://spamcop.net/w3m?action=checkblock&ip={}'.format(sys.argv[1])).read().split('\n') if re.match(r'^{}.*'.format(sys.argv[1]),re.sub(r'<[^>]+>','',x))]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment