Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

better url recognition

  • Loading branch information...
commit 6aee692ab8d9517285619133ec494330f0b9d202 1 parent 99fbe71
@kronoc authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 podcast2playlist.pl
View
5 podcast2playlist.pl
@@ -7,7 +7,8 @@
use LWP::UserAgent;
use XML::RSS::Parser;
use FileHandle;
-use Date::Parse
+use Date::Parse;
+use URI;
binmode STDOUT, ':encoding(utf8)';
binmode STDERR, ':encoding(utf8)';
@@ -23,7 +24,7 @@
my $p = XML::RSS::Parser->new;
my $feed;
-if ($self->{url} =~ m/http/){
+if (URI->new($self->{url})->scheme ){
my $ua = LWP::UserAgent->new;
$ua->agent('Podcast To Playlist');
$ua->from($self->{user});
Please sign in to comment.
Something went wrong with that request. Please try again.