Answer the question
In order to leave comments, you need to log in
Exporting documents from google-docs via python-api
simple export code from google docs
# -*- coding: utf-8 -*-
import gdata.docs
import gdata.docs.service
gd_client = gdata.docs.service.DocsService()
gd_client.ClientLogin('[email protected]', 'superpassword')
#загружаем файл print.html в google docs
ms = gdata.MediaSource(file_path='print.html', content_type="text/html")
entry = gd_client.Upload(ms, 'NewDocument')
#экспортируем файл в doc
file_path = 'print.doc'
gd_client.Export(entry, file_path)
Answer the question
In order to leave comments, you need to log in
pdb debugger helped to find the problem)
in general, in the gdata/docs/service.py file, in the _DownloadFile() function, added to the beginning:
uri = uri.replace("export/","")
Here blog.programmableweb.com/2009/02/20/google-api-now-lets-you-get-documents-in-many-formats/ seems to have what you need - there is a link to examples in several languages, I think you'll figure it out . Yes, protocol version 3.0, what's in Labs
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question