Solved

creating a mirror with wget

Posted on 2009-05-12
5
609 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
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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Suggested Solutions

Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
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…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

679 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