iBooks EPUBs actually show up on macOS as folders. If you need the actual file you can use the above script to convert your iBook directory of files to a destination directory.
The path of iBook files as of macOS 10.15.7 is:
/Users/${USER}/Library/Mobile Documents/iCloud~com~apple~iBooks/Documents
mkdir converted
python convert_ibook.py "/Users/${USER}/Library/Mobile Documents/iCloud~com~apple~iBooks/Documents" converted