Last active
November 20, 2017 21:06
-
-
Save paveljurca/a6003b8378aa19d438cb to your computer and use it in GitHub Desktop.
download the podcast mp3s from given simplecast.fm
This file contains 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 characters
use strict; | |
use warnings; | |
use LWP::UserAgent; | |
use HTTP::Request::Common; | |
use constant API | |
=> 'http://simplecast.fm/podcasts/1446/rss'; | |
my @html = split m|<title>|, | |
LWP::UserAgent->new->request(GET API)->decoded_content; | |
# cut the first odd and heading | |
for (@html[3..$#html]) { | |
my ($title) = m|^([^<]+)|; | |
my ($url) = m|<enclosure url="([^"]+)|; | |
$title =~ s/Chapter //; | |
# system "wget", $url, "-O", "/home/pavel/Downloads/Marketing_for_Developers/mp3/$title.mp3"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment