Re: Unescaping URLs in Python

2006-12-25 Thread Jeffrey Froman
John Nagle wrote: > What's the appropriate Python function to call to unescape a URL which > might contain things like that? xml.sax.saxutils.unescape() > Will this interfere with the usual "%" > type escapes in URLs? Nope, and urllib.unquote() can be used to translate URL escapes manually.

Re: Unescaping URLs in Python

2006-12-25 Thread John Nagle
Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, John Nagle > wrote: > > >>Here's a URL from a link on the home page of a major company. >> >>About Us >> >>What's the appropriate Python function to call to unescape a URL >>which might contain things like that? > > > Just use any HTM

Re: Unescaping URLs in Python

2006-12-24 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, John Nagle wrote: > Here's a URL from a link on the home page of a major company. > > About Us > > What's the appropriate Python function to call to unescape a URL > which might contain things like that? Just use any HTML-parsing library. I think the standard Pyt

Unescaping URLs in Python

2006-12-24 Thread John Nagle
Here's a URL from a link on the home page of a major company. About Us Yes, that "&" is in the source text of the page. This is, in fact, correct HTML. See http://www.htmlhelp.com/tools/validator/problems.html#amp What's the appropriate Python function to call to unescape