import re, sys, glob, json, html out = [] for f in sorted(glob.glob(sys.argv[1] + '/*.html')): h = open(f, encoding='utf-8').read() for blk in re.split(r'