Clemzd
Clemzd

Reputation: 945

Why wget does not download included videos?

I use wget to download an entire website with all included assets, the problem is that wget does not download included videos.

For example with this website, if I execute the following command :

wget -q -r ‐‐page-requisites http://videohtml5.byethost11.com/index.html

It download almost everything but if you open the web page, you'll see that the video is not downloaded.

I have tried the following options without results:

However if I directly put the link to the video as an option of wget it works :

 wget -q -r ‐‐page-requisites http://videohtml5.byethost11.com/movie.mp4

But I would like to download everything in one command. I have read the wget manual but I didn't see any other option that could do that. That's why I am asking your help.

EDIT : I change the url to really match my need

SOLUTION : Because I am using Windows, I didn't get the latest released which has the fix for the bug. Do not download wget from http://gnuwin32.sourceforge.net/packages/wget.htm, but use https://eternallybored.org/misc/wget/ instead.

Upvotes: 1

Views: 2678

Answers (2)

Marco Bernardini
Marco Bernardini

Reputation: 705

The video is hosted at a different domain: you need the -H parameter.

See the manpage section about spanning hosts: https://www.gnu.org/software/wget/manual/wget.html#Spanning-Hosts

== Update ==

It seems wget has a bug preventing to download the <source> of the <video> tag. See https://lists.gnu.org/archive/html/bug-wget/2013-06/msg00070.html

Upvotes: 5

exoddus
exoddus

Reputation: 2340

This works as you expect:

wget -H -r --level=1 -k -p http://camendesign.com/code/video_for_everybody/

...

drwxr-xr-x 24 root root  4096 Apr 17 10:08 camendesign.com
drwxr-xr-x  2 root root  4096 Apr 17 10:08 clips.vorwaerts-gmbh.de
drwxr-xr-x  2 root root  4096 Apr 17 10:08 forum.camendesign.com
-rw-r--r--  1 root root 13700 May 12  2013 test.html
drwxr-xr-x  2 root root  4096 Apr 17 10:08 www.youtube.com
root@test /tmp/test# cd clips.vorwaerts-gmbh.de/
root@test /tmp/test/clips.vorwaerts-gmbh.de# ll
total 5396
-rw-r--r-- 1 root root 5510872 Feb  9  2010 big_buck_bunny.mp4

Upvotes: 0

Related Questions