Reputation: 455
I'm new to bash scripting and as I heard of "wget" I decided to write a script to download just the .mp4 file from a streamcloud (or whatever) link.
I use it normally like:
wget -q -O - http://somelink.com | grep keyword
(I redirect the wget to the standard out)
But the problem I'm having is that I've realized that I'm just getting the source of the page where you have to wait a few seconds until you can click the "go to video" button. So I'm stuck on it now and I don't know how could I access to the source of the page I'm really interested in, where I'd be able to grep the .mp4 link. I heard something of a post request but to be honest I don't know how to use it so much.
Sorry if I look too newbie in shell scripting, it's just that I am.
Thanks a lot. Any help would be appreciated.
Upvotes: 1
Views: 2766
Reputation: 659
In your query, you are only asking to write the output of wget to a file. This works more like redirection.
try:
wget -e --robots=off -r --level=0 -nc --accept mp4 somewebsite.com
this will work if the files are saved with a .mp4 extension.
--level=0 is an exception. you could try the command without the --level switch.
Upvotes: 1