Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Best Site Ripper

Name: Anonymous 2005-09-18 18:50

I'm looking for something that can let you rip multiple sites at once and download video, picture and zip files. Something like Picaloader.

Name: Anonymous 2005-09-19 19:37

>>13
Exactly. Sure:

#Opciones de esta versión
$ODESC = 'English version 1.0 [en]'; #Para la ayuda
$OOPTS = '-t 2 -nc -nH -w 1 --random-wait -r -k -p -R ad.*.*,ads.*.*'; #Opciones de WGET para leechear
$OLANG = '--header="Accept-Language: en,es;q=0.5"'; #Accept-Language
$OCHAR = '--header="Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3"'; #Accept-Charset
$OUSER = '-U "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040616"'; #User-Agent
$OBAKA = ''; #Para ejecutar en la ayuda, uso interno


#Verificar argumentos y mostrar ayuda
if ($#ARGV < 1 || int(@ARGV[1]) < 1) {
    eval $OBAKA;
    print 'LEECH v1.0 - Download a website using WGET
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Usage: LEECH URL depth [<option> [<option> [...]]]

    URL       Address to start leeching
    depth     Depth (minimum = 1)

<option>: (also lowercase)

    /V=x      Limits speed to x (bytes, uses KB if it ends in k, MB if in m)
    /P=x      Prefix x for all directories that will need to be created
    /N        Does not recurse upper directories (parents)
    /H        Also jumps to other hosts
    /R=x      Sets HTTP referrer to x
    /C        Disables server-side cache (Pragma: No-cache)
    <WGET>    Any WGET option (see wget --help)

', $ODESC, "\n";
    exit (1);
}

#Extraer partes
$url = shift(@ARGV);
$prof = shift(@ARGV);
$args = join(" ", @ARGV);

#Procesar argumentos
if ($args) {
    study $args;
    $args =~ s|\B/[Vv]=([0-9]+[km]?)\b|--limit-rate=$1|;
    $args =~ s|\B/[Pp]=([^*?:\\\/<>\|\s]+)|-P $1 |;
    $args =~ s|\B/[Nn]\b|-np|;
    $args =~ s|\B/[Hh]\b|-H|;
    $args =~ s|\B/[Rr]=(\S+)|--referer=$1|;
    $args =~ s|\B/[Cc]\b|-C off|;
}

$a = "wget $OOPTS -l $prof $args $OLANG $OCHAR $OUSER $url";

print 'Invoking: ', $a;

system ($a);

This is Perl BTW. Name it leech.pl under Windows (and add .PL to PATHEXT and Perl's bin directory to PATH); add #!/usr/bin/perl and name it leech under *nix.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List