Hi Neal, You should use the <content src=".."> link of the entry: entry.content.src + '&exportFormat=html'
Note, that link doesn't contain a /a/domain.com. Eric On Mon, Jul 27, 2009 at 8:04 PM, NealWalters <nealwalt...@nealwalters.com>wrote: > > Am I not constructing my URL for this atom feed correctly? > > http://docs.google.com/a/nealwalters.com/feeds/download/documents/Export?docID=3WCTest&exportFormat=html > > If I paste in the browser, I get 404. A friend tried it, and he got a > logon screen (apparently I'm logged on and have a session token in my > browser). > > Python Query: > > client = gdata.docs.service.DocsService() > #set userid/password.... > client.accountType = "HOSTED" > > url = "http://docs.google.com/a/nealwalters.com/feeds/download/ > documents/Export?docID=3WCTest&exportFormat=html" > > print "url = " + str(url) > result = client.Get(url) > print "---- Results: ------- " > print "Google GDocs Response 2: " + result > > > When I tried http://docs.nealwalters.com/feeds/etc... (in the Python > code). > I get 302 permanently moved message (after I turned on the debugger). > > Actually, seems like I was hitting a bug there. Apparently the code > thought it got an valid XML feed, and started running it through XML > processor, and choked. > > Traceback (most recent call last): > File "GdataGetDoc.py", line 56, in <module> > result = client.Get(url) > File "c:\Program Files\Google\google_appengine\gdata\service.py", > line 1039, i > n Get > encoding=encoding, converter=converter) > File "c:\Program Files\Google\google_appengine\gdata\service.py", > line 1039, i > n Get > encoding=encoding, converter=converter) > File "c:\Program Files\Google\google_appengine\gdata\service.py", > line 1039, i > n Get > encoding=encoding, converter=converter) > File "c:\Program Files\Google\google_appengine\gdata\service.py", > line 1020, i > n Get > feed = gdata.GDataFeedFromString(result_body) > File "c:\Program Files\Google\google_appengine\gdata\__init__.py", > line 465, i > n GDataFeedFromString > return atom.CreateClassFromXMLString(GDataFeed, xml_string) > File "c:\Program Files\Google\google_appengine\atom\__init__.py", > line 97, in > CreateClassFromXMLString > tree = ElementTree.fromstring(xml_string) > File "<string>", line 85, in XML > SyntaxError: not well-formed (invalid token): line 154, column 60 > Press any key to continue . . . > > > My file is obviously there and I can see it when I do a list like > this; > # Query the server for an Atom feed containing a list of your > documents. > documents_feed = client.GetDocumentListFeed() > # Loop through the feed and extract each document entry. > for document_entry in documents_feed.entry: > # Display the title of the document on the command line. > print document_entry.title.text > > Thanks, > Neal Walters > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Docs Data APIs" group. To post to this group, send email to Google-Docs-Data-APIs@googlegroups.com To unsubscribe from this group, send email to google-docs-data-apis+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Docs-Data-APIs?hl=en -~----------~----~----~----~------~----~------~--~---