use LWP::Simple; $url = get("https://class.coursera.org/automata-002/lecture/index"); $link = ''; foreach (split /\n/, $url){ if(/download\.mp4/){ $_ =~m/href="(.+)"/; $link = $1; } if(/(Video \(MP4\) for )(.+)<\/div>/){ print "downloading $2\n" if $1; $file = get($link); open FILE,'>'.$2.'.mp4' or die $!; print FILE $file; close FILE; } }
In reply to Re: Trying to download video from URL links
by Lennotoecom
in thread Trying to download video from URL links
by soulrain
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |