Parses a warc file for mime types, written for Python 2