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?
精彩评论