Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Internet (https://www.clubdelphi.com/foros/forumdisplay.php?f=3)
-   -   Como Guardar una pagina web completa, con todo e imagenes (https://www.clubdelphi.com/foros/showthread.php?t=26026)

teatry 11-10-2005 15:10:33

Como Guardar una pagina web completa, con todo e imagenes
 
Utilizo El EmbeddedWb y me preguntaba si hay alguna manera de guardar las paginas web en forma completa, incluyendo las imagenes.
gracias de antemano

RazoR 11-10-2005 16:07:15

Googleando encontré ésto, no lo pude testear porque no tengo tiempo. Fijate si te sirve:

Saving Full Internet Explorer pages as MHT...
This is a Delphi conversion of the routine contributed by Onega
found at http://codeguru.earthweb.com/ieprogr...WholePage.html

MrBaseball34


Código Delphi [-]
//***********************************************************************
// If you don't have these typelibs, import them.
//***********************************************************************
uses Winndows, ..., ADODB_TLB, CDO_TLB;

//***********************************************************************
// SaveWholePage -
//   Procedure to save entire web page as MHT file.
//
//   Parameters:
//   AURL - URL for file to be saved
//   AFileName - MHT FileName you want web page saves.
//   AView - Allows you to view the MHT in TWebBrowser
//   AViewer - WebBrowser control to view the page in.
//
//***********************************************************************
procedure SaveWholePage
 ( AURL:               String
 ; AFileName:       TFileName
 ; AView:              Boolean
 ; AViewer:           TWebBrowser
 );
var
 LMsg: IMessage;
 LConf: IConfiguration;
 LFlds: Fields;
 LStrm: _Stream;
begin
 LMsg := CoMessage.Create;
 LConf := CoConfiguration.Create;
 try
   LMsg.Configuration := LConf;
   LMsg.CreateMHTMLBody(AURL, cdoSuppressAll, '', '');
   LStrm := LMsg.GetStream;
   LStrm.SaveToFile(AFileName, adSaveCreateOverWrite);
 finally
   LMsg := nil;
   LConf := nil;
   LStrm := nil;
   if AView then
     AViewer.Navigate(AFileName);
 end;
end;


La franja horaria es GMT +2. Ahora son las 20:45:40.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi