Il mio blog-spazio.

Consultare sito web offline: wget!

Scaricare e quindi consultare un sito web successivamente, anche essendo offline?
Si può fare. Utilizzeremo un tool nato su linux nel 1996: wget, un gestore di download che funziona tramite riga di comando, no-gui ad oggi multi-piattaforma.
Prelevate il tool qui
Create una cartella, inserite dentro wget.exe,
restando all'interno di quella cartella tenete premuto il tasto SHIFT + tasto destro del mouse
dovreste avere Apri finestra di comando qui

apro parentesi
Se siete su Win10, sappiate che Microsoft ha rimosso questa opzione in favore di PowerShell, potete riabilitarla andando
sempre sul mio repo ( qui ) ed eseguire il file di registro (cmd shift.reg)
quindi ora avreste sicuramente "Apri CMD" andando a fare shift+dx topo


Possiamo scaricare ora il sito web che ci interessa.
Vi spiego brevemente i comandi che utilizzeremo di wget, ovvero:
-m (mirror)
-k (convert-links)
-p (page-requisites)

Vado rapido,
vi posto la FAQ del wget


-m
Turn on options suitable for mirroring. This option turns on recursion and time-stamping, sets infinite recursion depth and keeps FTP directory listings.


-k
After the download is complete, convert the links in the document to make them suitable for local viewing. This affects not only the visible hyperlinks, but any part of the document that links to external content, such as embedded images, links to style sheets, hyperlinks to non-HTML content, etc.


-p
This option causes wget to download all the files that are necessary to properly display a given HTML page. Including such things as inlined images, sounds, and referenced stylesheets


..Per essere tranquilli possiamo dare anche un -w (wait time),
di qualche secondo ogni richiesta,
5 ad esempio;
questo perchè molti siti bloccano le troppe richieste e c'è la possibilità di avere un download incompleto,
causa blocco lato server.

il comando finito da dare in CMD sarà questo:

wget.exe -mkp -w 5 www.sitoweb.it

dove sitoweb.it il sito che vi interessa consultare in modalità offline, ovviamente.

Salut.