oleobj is a script to extract embedded objects from OLE files.
It can be used either as a command-line tool, or as a python module from your own applications.
It is part of the python-oletools package.
How to use oleobj in Python applications
See rtfobj.py source code.