Absolute TO Relative URLs

Satheesh Babu vsbabu at erols.com
Wed May 9 07:35:23 EDT 2001


Thanks folks! Just's code was very easy to follow.

Thanks for all the help.

Though I didn't understand that editor bit from William Parker - I'm
assuming that it didn't imply that posters looking for help in NGs rather
wait than code on their own :-) Like "M" said, "if I want sarcasm, I'll talk
to my grand children (when I've them)"; in case my assumption was wrong.

Thx

--
v.s.babu
vsbabu at erols.com
http://vsbabu.csoft.net
"Satheesh Babu" <vsbabu at erols.com> wrote in message
news:9d9bf6$soo$1 at bob.news.rcn.net...
> Hi,
>
> Let us say I've an HTML document. I would like to write a small Python
> script that reads this document, goes through the absolute URLS (A HREF,
IMG
> SRC etc) and replaces them with relative URLs. I can pass a parameter
which
> specifies the BASE HREF of the document.
>
> I'm not sure whether I should proceed with regex nightmare or are there
any
> easy solutions?
>
> Any help/pointers will be greatly appreciated.
>
> Thanks
>
> --
> v.s.babu
> vsbabu at erols.com
> http://vsbabu.csoft.net
>
>





More information about the Python-list mailing list