Solved

creating a mirror with wget

Posted on 2009-05-12
5
610 Views
Last Modified: 2012-05-06
Hi All,

I'm trying to create a mirror of a website by using wget. It works pretty well on most pages. The HTML of the problem pages tries to include css files which were not downloaded by wget. What is the easiest way to solve this? See the code below.
<style type="text/css" media="screen">@import "/path/file.css";</style>

Open in new window

0
Comment
Question by:alberthendriks
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 8

Expert Comment

by:thetmanvn
ID: 24362491
Pretty details on doing mirror with wget

http://linuxreviews.org/quicktips/wget/

Another Solution: Using HTTrack for Linux

http://www.httrack.com/page/2/en/index.html

Good luck
0
 
LVL 13

Expert Comment

by:qwerty021600
ID: 24362661
<STYLE TYPE="text/css" MEDIA="screen">
<!--
  @import url(/path/file.css);
-->
</STYLE>
0
 
LVL 40

Accepted Solution

by:
omarfarid earned 500 total points
ID: 24365935
what wget command did you use?
0
 
LVL 2

Author Comment

by:alberthendriks
ID: 24372254
I use the code below. The idea of the strange base-url is that I could string-replace it later. However it appears nowhere, and it doesn't seem relevant.
wget --base="{{__base-url__}}" \
     --convert-links \
     -i urls.txt \
     --user-agent="Firefox faker for migration" \
     --directory-prefix ~/public_html/migratie \
     --mirror \
     --save-headers \
     --limit-rate=45k \
     -N \
     -o wget.log \
     --page-requisites \
     --cache=off \
     --exclude-directories=foo,bar

Open in new window

0
 
LVL 2

Author Closing Comment

by:alberthendriks
ID: 31580436
Nobody seems to know a solution. I chose to give the points to someone who doesn't pretend to have one.
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question