with open(stopwordfile, 'r') as f:
    stopwords = '|'.join(f.read().lower().split())
regex = re.compile('.*<div class="body">(.*?)</div>.*', re.DOTALL)
Counting frequency of words in documents using python regex