Syntax issue with wget to include only 1 domain

Hi,
I am trying to use wget for only one domain but when I use the --domains=mydomain.com parameter it doesn't seem to limit it to just that domain.

Any ideas what I'm doing wrong?
LVL 1
jodygliddenAsked:
Who is Participating?
 
Gabriel OrozcoConnect With a Mentor Solution ArchitectCommented:
sorry, what if you add -L ?

from the manual:

When only relative links are followed (option `-L'), recursive retrieving will never span hosts. No time-expensive DNS-lookups will be performed, and the process will be very fast, with the minimum strain of the network. This will suit your needs often, especially when mirroring the output of various x2html converters, since they generally output relative links.

also you can limit the domain to use so if there are some full links, where two or three domains are hosted on the same server and you want them, but it would be like this:

wget -r -H -Ddomain1.com,domain1.edu http://www.domain1.edu/

this wil span hosts (-H) but limit only to domain1.com and domain1.edu (-D) all recursive (-r)

maybe this is what you were looking for
0
 
Gabriel OrozcoSolution ArchitectCommented:
try to add -l 1 :

       -l depth
       --level=depth
           Specify recursion maximum depth level depth.  The default maximum depth is 5.
Also:
--------------------
 Actually, to download a single page and all its requisites (even if they exist
 on separate websites), and make sure the lot displays properly locally, this author likes
 to use a few options in addition to -p:

 wget -E -H -k -K -p http://<site>/<document>

and I like this option:
------------------------
       -np
       --no-parent
           Do not ever ascend to the parent directory when retrieving recursively.  This is a useful
           option, since it guarantees that only the files below a certain hierarchy will be down-
           loaded.

0
 
jodygliddenAuthor Commented:
Hi I'm trying to download the whole site though.
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

 
Gabriel OrozcoSolution ArchitectCommented:
wget -E -H -k -K -p http://<site>/<document>
0
 
jodygliddenAuthor Commented:
Hi,
I still can't seem to limit it to just the domain I'm looking for using these parameters.
0
 
jodygliddenAuthor Commented:
I appreciate the attempts but I can definitively tell you that these are not the answer.

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.