开发者

Retrieve base URL path to be used in download image, CSS and javascript files from web page

We are downloading web page linked Images, style sheet(.css) and javascript files using web browser control (IWebbrowser2 and IHTMLDocument interface) ATL win32 application.

Now for some of the web page image src= "/images/a1.jpg" are relative, so we need to append a base host address to the location and download.

Do we have any method to get the base host address URL path to be append into image path. or any good parser to开发者_开发技巧 extract that?

Thanks, Ramanand Bhat.


Does IWebBrowser2::LocationURL or IHTMLDocument2::URL not give you the base URL you need?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜