Skip to content

Instantly share code, notes, and snippets.

@jadeallenx
Forked from tempire/ow ith ojo!
Created September 11, 2012 19:50
Show Gist options
  • Save jadeallenx/3701547 to your computer and use it in GitHub Desktop.
Save jadeallenx/3701547 to your computer and use it in GitHub Desktop.

Revisions

  1. Mark Allen revised this gist Sep 11, 2012. No changes.
  2. Mark Allen revised this gist Sep 11, 2012. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions ow ith ojo
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    perl -C -S -MTime::Piece -Mojo -E '$i=1; mkdir $dir=$ENV{HOME}."/Dropbox/tunes.io/".localtime->ymd; say $_->text and g($_->attrs("href"))->max_message_size(25600000)->content->asset->move_to("$dir/${\$i++} ${\$_->text}.mp3") for g("tunes.io")->dom("ul a")->each'
  3. @tempire tempire revised this gist Sep 11, 2012. 2 changed files with 1 addition and 1 deletion.
    1 change: 0 additions & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1 +0,0 @@
    perl -MMojo::UserAgent -MFile::Path=make_path -C -S -E 'my $ua=Mojo::UserAgent->new; chomp(my $date=`date +%Y%m%d`); my $path=$ENV{HOME} . "/Dropbox/tunes.io/$date"; make_path( $path ); $ua->get("http://tunes.io")->res->dom->html->body->div->ul->find('a')->each( sub { say "Getting " . $_->text; $ua->max_redirects(5)->get($_->{href})->res->content->asset->move_to($path."/".$_->text().".mp3") } )'
    1 change: 1 addition & 0 deletions ow ith ojo!
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    perl -MTime::Piece -Mojo -E 'mkdir $dir=$ENV{HOME}."/Dropbox/tunes.io/".localtime->ymd; say $_->text and g($_->attrs("href"))->content->asset->move_to("$dir/${\$_->text}.mp3") for g("tunes.io")->dom("ul a")->each'
  4. Mark Allen created this gist Sep 10, 2012.
    1 change: 1 addition & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    perl -MMojo::UserAgent -MFile::Path=make_path -C -S -E 'my $ua=Mojo::UserAgent->new; chomp(my $date=`date +%Y%m%d`); my $path=$ENV{HOME} . "/Dropbox/tunes.io/$date"; make_path( $path ); $ua->get("http://tunes.io")->res->dom->html->body->div->ul->find('a')->each( sub { say "Getting " . $_->text; $ua->max_redirects(5)->get($_->{href})->res->content->asset->move_to($path."/".$_->text().".mp3") } )'