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

Pages: 1-

mods

Name: Anonymous 2008-10-05 3:25

is /prog/ a fan of mods?

then I share my 2 favorite composers (they both work together with some other guy): WAVE and Laxity...

in their webpage they let you download some of their songs, but the FUCKING page doesn't have a nice html so I can rip off the links easily..

so what the hell
I did this perl code to get it for me, and it also extracts the files... (oh, you need the chilkat module to use it obv)


use chilkat;

$http = new chilkat::CkHttp();

$success = $http->UnlockComponent("dongs dongs dongs dongs dongs");
if ($success != 1) {
    print $http->lastErrorText() . "\n";
    exit;
}

print "Getting the Maniacs of Noise download page...\n";
$success = $http->Download("http://www.xs4all.nl/~mon/download.htm","links.htm");
if ($success != 1) {
  print $http->lastErrorText() . "\n";
}
else {
  print "Download Completed!" . "\n";
}

print "Starting the download and extraction of the songs!\n";

open FILE, "links.htm" or die $!;

$zip = new chilkat::CkZip();
$zip->UnlockComponent("dongs dongs dongs dongs dongs");


while (<FILE>) {
  next if ($_ =~ m/ft208/);
  next if ($_ =~ m/xmplay/);
  if ($_ =~ m/'(.*)zip'/) {
    print "Downloading $1zip...\n";
    $success = $http->Download("http://www.xs4all.nl/~mon/$1zip","$1zip");
    if ($success != 1) {
      print $http->lastErrorText() . "\n";
    }
    else {
      print "$1zip Download Complete!" . "\n";
    }
    print "Extracting $1zip...\n";
    $success = $zip->OpenZip("$1zip");
    if ($success) {
      $numUnzipped = $zip->Unzip("songs");
      print "Extraction of $numUnzipped file(s) successful.\n";
    }
    else {
      $zip->SaveLastError("openZipError.txt");
    }     
  }
}
print "All files were extracted to the ./songs/ folder. Enjoy!\n";

Name: Anonymous 2008-10-05 5:39

mods = fags

Name: Anonymous 2008-10-05 6:21

>>2
fags = >>2

Name: Anonymous 2008-10-05 7:10

They were better when they were still on the C64.

Name: OP 2008-10-05 8:22

>>4
I loev alibi.sid

Name: Anonymous 2008-10-05 10:20

$success = $http->UnlockComponent("dongs dongs dongs dongs dongs");

   <3
(- v -)

Name: Anonymous 2008-10-05 14:34

Why use Chilkat? Also, you forgot use strict

Name: Anonymous 2008-10-06 13:35

>>7 Why use Chilkat?
because I couldn't find an easier way of downloading stuff

how do I http-downloaded in perl? ;_;

Name: Anonymous 2008-10-06 13:53

>>8
use LWP::Simple;

Name: Anonymous 2008-10-06 14:41

>>9
use LWP::UserAgent;

Name: Anonymous 2008-10-06 15:13

Use /dev/random

Name: Anonymous 2008-10-06 15:16

>>10
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
my page = $ua->get('http://example.com');


... compared to...

use LWP::Simple;
my page = get 'http://example.com';


The former is longer and slower, and most people don't need the extra functionality offered by UserAgent.

Name: Anonymous 2008-10-06 15:59

...
then how do I write that "page" into a file?

Name: Anonymous 2008-10-06 16:55

getstore("http://example.com", "index.html")

Name: Anonymous 2008-10-07 6:52

Name: Anonymous 2008-10-07 12:44

>>12
Spoofing user agent name? does LWP::Simple allows POST?

Name: Anonymous 2009-02-25 7:23

future project seems like   its possible for   people not to   trust a language   of your choice   Please refrain from   using it in   this instance because   Practical Common Lisp   is the second   coming of the   right subtree from   the left subtree.

Name: Anonymous 2009-03-06 9:46


and invoicing system for   example a physics   simulation but let   me do it   on a computer   SCIENCE MAJOR I   GREATLY ENJOY COMPUTER.

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