Subject: | BUG: guid field will not be retrieved |
Date: | Mon, 5 Sep 2016 12:24:09 -0700 |
To: | bug-XML-RSS [...] rt.cpan.org |
From: | Ken Ingram <ken.ingram [...] gmail.com> |
#!/usr/bin/perl -w
use strict;
use diagnostics;
use POSIX qw(strftime);
use Data::Dumper;
use DateTime;
use DBI;
use XML::RSS;
use LWP::Simple qw(get);
use Getopt::Std;
use subs qw(recordCheck setMonth updateDB insertData downloadFile
cycleEntries);
use subs qw(updateData insertData downloadFile dbCall);
my ($dt, $year, $month, $day,$hour,$minute,$second, $time);
my ($duration, $author, $show_date, $original_link, $description, $link);
my (@date, @tmp_filename, @result,@to_download, @entry);
my ($tmp, $file_num, $filename, $sth, $row, $item, $title, $guid, $entry);
my (@filenum_sorted, @data, @update, @insert, @download);
my (%entry,%temp);
my $url="http://recordings.talkshoe.com/rss44889.xml";
my $rss = XML::RSS->new;
my $data = get($url);
$rss->parse($data);
foreach $item ( @{ $rss->{items} } ){
$author = $item->{'author'};
$title = $item->{'title'};
$guid = $item->{'guid'};
$duration = $item->{'http://www.itunes.com/dtds/podcast-1.0.dtd'}-
Show quoted text
>{duration};
$description = $item->{description};
$show_date = $item->{pubDate};
$link = $item->{link};
print $item->{'author'} . "\n";
print $item->{title} . "\n";
print $item->{guid} . "\n";
print $item->{'http://www.itunes.com/dtds/podcast-1.0.dtd'}->{duration} .
"\n";
print $item->{description} . "\n";
print $item->{pubDate} . "\n";
print $item->{link} . "\n";