On May 7, 1:08 pm, "Aaron Swartz" <[EMAIL PROTECTED]> wrote:
> Visiting:http://utilitymill.com/api/xml/utility/get_Book_Data_by_ISBNs/13/run?...
>
> works fine for me. (Clicking the link in Gmail doesn't because Gmail
> is double-encoding the URL.)

Good catch.  So at least I know everything on the server is working as
it should.

I still get the issue when I pull the URL from Python though.  Do you
think urllib2 double encodes it?

>>> import urllib,urllib2
>>> base_url='http://www.utilitymill.com/api/xml/utility/get_Book_Data_by_ISBNs/13/run?'
>>> url=base_url + 
>>> urllib.urlencode({'ISBNS':'9780596513986\r\n9780688128166','HTML':'1'})
>>> print url
http://www.utilitymill.com/api/xml/utility/get_Book_Data_by_ISBNs/13/run?HTML=1&ISBNS=9780596513986%0D%0A9780688128166
>>> print urllib2.urlopen(url).read()
<?xml version="1.0" ?><UtilityMill><output><![CDATA[Content-Type: text/
HTML
<html><body><dl>
9780596513986%0D%0A9780688128166 is not a valid value for ItemId.
Please change
this value and retry your request.
</dl></body></html>]]></output></UtilityMill>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to