Search
 
SCRIPT & CODE EXAMPLE
 

PERL

perl download images files

use strict;$|++; use WWW::Mechanize;use File::Basename; my $m = WWW::Mechanize->new; $m->get("http://www.despair.com/indem.html"); my @top_links = @{$m->links}; for my $top_link_num (0..$#top_links) {    next unless $top_links[$top_link_num][0] =~ /^http:/;     $m->follow_link( n=>$top_link_num ) or die "can't follow $top_link_num";     print $m->uri, "
";    for my $image (grep m{^http://store4}, map $_->[0], @{$m->links}) {        my $local = basename $image;        print " $image...", $m->mirror($image, $local)->message, "
"    }     $m->back or die "can't go back";}
Comment

PREVIOUS NEXT
Code Example
Perl :: how to initialize an array 
Pascal :: pascal read 
Pascal :: pascal wait for key 
Pascal :: pascal try catch finally 
Pascal :: pascal repetition 
Pascal :: Pascal (fpc 3.0.4) sample 
Powershell :: powershell take ownership recursive command 
Powershell :: How to test HDD health in PowerShell 
Gdscript :: godot get root node 
Gdscript :: godot update value in progressbar 
Abap :: abap shortcut comments 
Cobol :: alertDialog with textfield validator flutter 
Assembly :: pyplot name axes 
Assembly :: set assembly highligh vim 
Assembly :: what do you mean by io address and memory address 
Assembly :: list all sensors android 
Javascript :: jquery vslidation remove spaces from input 
Javascript :: map range of numbers to another range 
Javascript :: jest cache clear 
Javascript :: javascript replace spaces with dashes 
Javascript :: import redux thunk 
Javascript :: jquery refresh page 
Javascript :: delete session javascript 
Javascript :: get week day name in javascript 
Javascript :: how to remove checked attribute of checkbox in jquery 
Javascript :: loop array backwards javascript 
Javascript :: generate random whole numbers within a range javascript 
Javascript :: jquery remove and add class 
Javascript :: how to use another port in angular 
Javascript :: How to get current URL with Javascript or React 
ADD CONTENT
Topic
Content
Source link
Name
5+6 =