Saving Web Pages

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Saving Web Pages

Udo Schneider
Hi all,

how can I download a webpage (including all associated resources) in
Dolphin? I want
to create some kind of offline store for web pages.

Thanks,

Udo


Reply | Threaded
Open this post in threaded view
|

Re: Saving Web Pages

Bill Schwab-2
Udo,

> how can I download a webpage (including all associated resources) in
> Dolphin? I want
> to create some kind of offline store for web pages.

Ian's Wiki Watcher would be logical starting point.  I'm not sure of it's
status though.

Have a good one,

Bill

--
Wilhelm K. Schwab, Ph.D.
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Saving Web Pages

Udo Schneider
Bill,

> Ian's Wiki Watcher would be logical starting point.  I'm not sure of it's
> status though.
Thanks. I'll take a look at it.


Udo


Reply | Threaded
Open this post in threaded view
|

Re: Saving Web Pages

Steve Waring-2
Hi Udo,

It may be worth your while to have a look at the "Reusing the Browser"
section [1] of MSDN. I could not see an interface which provides the same
functionality as "save complete web page", but you may find what you need in
one of the Web Browser Services.

A second option is to generate some of the MSHTML interfaces. There are alot
of them, but you could start with IHTMLDocument2 [3] and access it through
the IWebBrowser document property [2] (or just have a look around in an
inspector). At the least it will give you access to the link urls.

The following will give you access to a DOM DHTML interface;

control := AXControlSite progId: 'Shell.Explorer.2'.
control controlDispatch navigate: 'http://www.yahoo.com'.
control controlDispatch document queryInterface: IHTMLDocument2.



Good luck!
Steve

[1]
http://msdn.microsoft.com/workshop/browser/webbrowser/wbentry.asp?frame=true

[2]
http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/mshtml/r
eference/ifaces/document/document.asp

[3]
http://msdn.microsoft.com/workshop/browser/mshtml/reference/ifaces/document3
/document3.asp?


Reply | Threaded
Open this post in threaded view
|

Re: Saving Web Pages

Stefan Matthias Aust
"Steve Waring" <[hidden email]> schrieb im Newsbeitrag
news:9rvl5v$vum04$[hidden email]...

> It may be worth your while to have a look at the "Reusing the Browser"
> section [1] of MSDN. I could not see an interface which provides the same
> functionality as "save complete web page", but you may find what you need
in
> one of the Web Browser Services.

I think, there is no such interface, but you can write this function
yourself:

Create two folders to store your page, "your page" and "your page\images".
Get an IWebBrowser2 object and use

    browser navigate: yourWebpage

to let it load the page you want to save. Wait for the DocumentComplete
event, then ask for all images:

    imgCollection := browser document all tags: 'IMG'

This returns a collection you can enumerate:

    0 to: imgCollection length - 1 do: [:index |
        img := imgCollection item: index

Each image object has a src property which contains the image URL. I didn't
find a way to access the image data directly, so you probably have to use
that URL to request the image again and store it to "your page\images". Now
change the image src:

    img src: 'your page\images\name.gif'

Eventually, save the modified HTML page as "index.html" to "your page". You
get the page source this way:

    browser document documentElement outerHTML


bye
--
Stefan Matthias Aust  //  Truth Until Paradox