is there a bug in urlunparse/urlunsplit
Nikita the Spider
NikitaTheSpider at gmail.com
Mon May 19 10:59:20 EDT 2008
In article
<09764c57-03ce-4ccb-a26d-e851899dcc7c at a23g2000hsc.googlegroups.com>,
Alex <metallourlante at gmail.com> wrote:
> Hi all.
>
> Is there a bug in the urlunparse/urlunsplit functions?
> Look at this fragment (I know is quite silly):
>
> urlunparse(urlparse('www.example.org','http'))
> ---> 'http:///www.example.org'
> ^^^^^
>
> There are too many slashes, isn't it? Is it a known bug or maybe I
> missed something...
Hi Alex,
For a few years now I've been using Fourthought's libraries for parsing
URLs and they've performed beautifully. In the code comments, they state
that urlparse() and friends exhibit some non-RFCish behavior, hence the
inspiration for writing their own libraries.
If I remember correctly, the file you want is uri.py and it is in 4Suite
which you can download from here:
http://www.fourthought.com/
HTH
--
Philip
http://NikitaTheSpider.com/
Whole-site HTML validation, link checking and more
More information about the Python-list
mailing list