I'm stuck implementing a prototype to extract Google slides for other processing. When I try request = service_drive_v3.files().export_media(fileId=file_id, mimeType='text/html)
on a Google slide I get:
<HttpError 400 when requesting https://www.googleapis.com/drive/v3/files/<FILE_ID>/export?mimeType=text%2Fhtml&alt=media returned "The requested conversion is not supported.". Details: "[{'domain': 'global', 'reason': 'badRequest', 'message': 'The requested conversion is not supported.', 'locationType': 'parameter', 'location': 'convertTo'}]">
The Google Drive reference says that Google slides can be exported to PDF and other formats including text/plain
but not text/html
.
However, https://docs.google.com/presentation/d/<FILE_ID>/export/html
via a browser gives me a pretty nicely formatted HTML file just fine.
Is there a reason why the Drive API call fails even though Google seems to be able to export to HTML just fine? Is there a workaround.