Provide custom handlers for MimeTypeBasedParser.
Pass a dictionary mapping either file extensions (like "doc", "pdf", etc.) or MIME types (like "application/pdf", "text/plain", etc.) to parsers. Note that you must use either file extensions or MIME types exclusively and cannot mix them.
Do not include the leading dot for file extensions.
Example using file extensions:
handlers = {
"doc": MsWordParser(),
"pdf": PDFMinerParser(),
"txt": TextParser()
}
Example using MIME types:
handlers = {
"application/msword": MsWordParser(),
"application/pdf": PDFMinerParser(),
"text/plain": TextParser()
}