Wget downloads the website to a local device

Source: Internet
Author: User
Tags web2py

You can use wget to download an online website to a local device. Download the online ebook from the following example: http://web2py.com/books/default/chapter/29to the tutorial c:\d#web2pybooken.

 

1) wget download website

Sets LOCAL-DIR = c: \ D \ web2pybooken

Set WEBSITE-URL = http://web2py.com/books/default/chapter/29wget -- mirror -- page-requisites -- convert-links -- no-host-directories -- HTML-extension-P % LOCAL-DIR % WEBSITE-URL %

 

Wget help:

Wget-H.

-M, -- mirror cancel cut for-n-R-l inf -- no-Remove-listing.

-R, -- Recursive specify recursive download. -l, -- level = Number maximum recursion depth (inf or 0 for infinite ). -N, -- timestamping don't re-retrieve files unless newer than local.

-- No-Remove-listing don't remove '. Listing' files.

-P, -- page-requisites get all images, etc. Needed to display HTML page.

-P, -- directory-Prefix = prefix save files to prefix /...

-K, -- convert-links make links in downloaded HTML point to local files.

-E, -- HTML-extension save HTML documents with '.html 'extension.

-NH, -- no-host-directories don't create host directories.

 

 

2) Place the downloaded website on httpserver

The following is how to start httpserver locally through python2.7. Of course, you can also use other httpserver.

Cd % LOCAL-DIR %

Python-M simplehttpserver 8080

 

3) open a local website in IE

Http: // your-local-machine-IP: 8080 /*****

 

Complete!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.