[Htmlparser-user] set URL for relative links
Brought to you by:
derrickoswald
From: jpdogg <jp...@gm...> - 2006-09-11 16:59:01
|
Hello, I've cached some HTML pages in local files and would like to tell the Parser object what the original URLs were so that it can correctly interpret relative links. As a simple example, say I do this: Parser my_parser = new Parser("<html><img src='foo.jpg'></html>"); If I construct a filter to give me all of the ImageTags in this simple document, I get one. Unfortunately, it has the URL foo.jpg. If I know that this file was originally located at http://www.bar.com/foo.html, how do I inform the parser module? I want it to be able to report that the above image is located at http://www.bar.com/foo.jpg. Thanks! Jeff |