-
-
Save jadeallenx/3701547 to your computer and use it in GitHub Desktop.
Revisions
-
Mark Allen revised this gist
Sep 11, 2012 . No changes.There are no files selected for viewing
-
Mark Allen revised this gist
Sep 11, 2012 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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' -
tempire revised this gist
Sep 11, 2012 . 2 changed files with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +0,0 @@ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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' -
Mark Allen created this gist
Sep 10, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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") } )'