Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Find pages which didn't contain spam before
import os
import re
for name in os.listdir('.'):
if not os.path.exists(name + '/revisions/00000002'):
continue
with open(name + '/revisions/00000001', 'r') as h:
content = h.read()
if re.search('quickbook', content, re.IGNORECASE):
continue
print(name)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment