Skip to content

Instantly share code, notes, and snippets.

@dirk-thomas
Created January 11, 2016 17:39
Show Gist options
  • Save dirk-thomas/56372cb4fd91f62bbd9c to your computer and use it in GitHub Desktop.
Save dirk-thomas/56372cb4fd91f62bbd9c to your computer and use it in GitHub Desktop.
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