Cheers mater!
Home
Trying to put enclosures in my RSS using XML::RSS, but no matter what I try to add, the enclosure is ignored...
%item = (
'enclosure' => {
'type' => 'text/html',
'length' => '877',
'url' => 'http://www.lauraashley.com/'
},
'link' => 'http://www.clarkeology.com/stokey/22/12/',
'description' => 'Just trying to get a catalogue from lauraashley.com...',
'pubDate' => 'Tue, 2 Nov 2004 13:41:33 GMT',
'permaLink' => 'http://www.clarkeology.com/stokey/22/12/',
'title' => 'If you blog it, they will come'
)
$rss->add_item( %item );
The item's added every time, but the enclosure is ignored... are enclosures not supported in RSS 2.0? It's driving me mad...
pauly :: 2004 :: Comment / reply
Looks ok to me from the snippet - are you setting the
Also, I thought the XML::RSS support for 2.0 was in its very early stages at the moment so it may need more work before it supports everything you need it to do? Fairly sure it has full support for 0.9, 0.91, 0.92 and 1.0. I think enclosures were introduced back in 0.92 though so maybe the module's a bit buggy for 2.0 - what happens if you change the rss version header back e.g. "my $rss = new XML::RSS (version => '0.92');"?
Also, why are you puttin your attribute names in quotes? That might be causing it?
itchypaws :: 4 Nov :: 2004 :: Comment / reply
I suspect it's that XML::RSS isn't finished, but I will investigate further... You might have hit the nail on the head, I'm not specifically predeclaring the enclosures, maybe I need to do that, I thought XML::RSS would pick it up. There's no mention of it in any of the docs... I'm off to post a query on sourceforge.net...
I'm not putting the attributes in quotes in the real code, that bit I pasted onto the board was the output of Dumper( %item ), so I could see what was going in...
Got to run now, speak later, looking forward to next weekend...
pauly :: 4 Nov :: 2004 :: Comment / reply
Paul Clarke's blog - I live and work near Folkestone. Married to Clare and father to Harry, I am a web dev, and I like javascript, PHP, Folkestone Gerald, pubs, restaurants, history, genealogy, TV, music, popbitch, squirrels, pirates ☠, time travel, stained glass...
Also from the same week
Some more posts from the same week as .
extisp.icio.us - pauly [Monday 1 November 2004]
Grand Theft Auto San Andreas [Monday 1 November 2004]
Infinite Loops [Tuesday 2 November 2004]
iPod Download [Tuesday 2 November 2004]
media server / new computer [Tuesday 2 November 2004]
A cheap box from Mesh [Tuesday 2 November 2004]
If you blog it, they will come [Tuesday 2 November 2004]
did I saw laura ashley? [Tuesday 2 November 2004]
RSS Enclosure malarkey [Tuesday 2 November 2004]
Visions of sinking ships [Wednesday 3 November 2004]
Download Chart [Wednesday 3 November 2004]
The Darkness play Brixton, slight return [Thursday 4 November 2004]
SuprNova.org - .com and .net are scammers! - The REAL Universal BitTorrent source [Thursday 4 November 2004]
CORN [Thursday 4 November 2004]
I didn't know Jack "The Hat" McVitie was killed in Stokey [Thursday 4 November 2004]
RSS [Thursday 4 November 2004]
Hmm [Thursday 4 November 2004]
Cheers mater! [Thursday 4 November 2004]
i did know that [Friday 5 November 2004]
rilly rilly rilly busy [Friday 5 November 2004]
Lazy day [Saturday 30 October 2004]
VISITORS Web Log Analyzer [Saturday 30 October 2004]
Politics I think [Monday 8 November 2004]
They can't pay if I do it [Tuesday 9 November 2004]
Azureus - WhatIsNat [Wednesday 10 November 2004]
Reply posted on my Folkestone Forum [Wednesday 30 November 2005]
Azureus : Plugin Details for SafePeer [Saturday 21 January 2006]


