wget有能力做你在問什麼。剛剛嘗試以下操作:
wget -p -k http://www.example.com/
的-p
將讓你的所有必需的元素,以正確地查看網站(CSS,圖像等)。 -k
將更改所有鏈接(包括CSS &圖像的鏈接)以允許您脫機查看頁面,因爲它在線顯示。
從wget的文檔:
‘-k’
‘--convert-links’
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.
Each link will be changed in one of the two ways:
The links to files that have been downloaded by Wget will be changed to refer
to the file they point to as a relative link.
Example: if the downloaded file /foo/doc.html links to /bar/img.gif, also
downloaded, then the link in doc.html will be modified to point to
‘../bar/img.gif’. This kind of transformation works reliably for arbitrary
combinations of directories.
The links to files that have not been downloaded by Wget will be changed to
include host name and absolute path of the location they point to.
Example: if the downloaded file /foo/doc.html links to /bar/img.gif (or to
../bar/img.gif), then the link in doc.html will be modified to point to
http://hostname/bar/img.gif.
Because of this, local browsing works reliably: if a linked file was downloaded,
the link will refer to its local name; if it was not downloaded, the link will
refer to its full Internet address rather than presenting a broken link. The fact
that the former links are converted to relative links ensures that you can move
the downloaded hierarchy to another directory.
Note that only at the end of the download can Wget know which links have been
downloaded. Because of that, the work done by ‘-k’ will be performed at the end
of all the downloads.
如果答案不能正常工作,請嘗試:'wget的-E -H -k -K -p的http:// example.com' - 僅此工作了我。貸:http://超級用戶。com/a/136335/94039 – 2013-07-02 06:35:03
也有軟件可以做到這一點,[Teleport Pro](http://www.tenmax.com/teleport/pro/home.htm)。 – pbies 2016-10-08 20:18:00
'wget --random-wait -r -p -e robots = off -U mozilla http:// www.example.com' – davidcondrey 2017-07-17 07:47:04