annoyingmouse
01-20-2009, 06:36 PM
Firstly, I'm quite new to this so if the answer to this is obvious I apologise. I've searched on a few places but can't quite seem to find what I'm looking for.
I've been trying to create a bookmarklet in Firefox that will allow me to register details of xml/rss feeds of podcasts on this page for Reciva internet radio devices (http://www.reciva.com). Everytime I wish to enter a podcast into the "My Podcasts" section of that website, I am required to complete a form entering the details of the feed's title and url. I quite easily managed to create a script in a firefox bookmark with the following:
javascript:void(location.href='https://www.reciva.com/index.php?option=com_mypodcasts&podcastname='+document.title+'&podcasturl='+location.href+'&podcast_task=add')
which provides the site with the title of the feed in the required field "podcastname" and the url in the field "podcasturl". The code works well and the podcast is registered without a problem. However, the "My Podcasts" part of the reciva website also includes an optional "Description" field, "podcastdescription". I'd like to be able to have the script extract the value of the <description> tag from the <channel> section of the feed as this field. Obviously I'd have to add a further &podcastdescription='+????+' and I'm wondering what exactly is needed where I wrote "????" to extract the information stored in the <description> tag.
To give an example, when the bookmark with the above script is clicked whilst looking at this feed (http://xpn.org/podcasts/daytrotter/daytrotterpodcast.xml), the title "Daytrotter on Y-Rock Podcast" is added as the "podcastname" field, the url "http://xpn.org/podcasts/daytrotter/daytrotterpodcast.xml" is added as the "podcasturl" field but I can't seem to find a way of retrieving the contents of <description>, which in this case contains "A podcast version of the weekly Daytrotter Radio feature on Y-Rock on XPN hosted by Sean Moeller". How would I go about this?
Any help would be greatly appreciated.
I've been trying to create a bookmarklet in Firefox that will allow me to register details of xml/rss feeds of podcasts on this page for Reciva internet radio devices (http://www.reciva.com). Everytime I wish to enter a podcast into the "My Podcasts" section of that website, I am required to complete a form entering the details of the feed's title and url. I quite easily managed to create a script in a firefox bookmark with the following:
javascript:void(location.href='https://www.reciva.com/index.php?option=com_mypodcasts&podcastname='+document.title+'&podcasturl='+location.href+'&podcast_task=add')
which provides the site with the title of the feed in the required field "podcastname" and the url in the field "podcasturl". The code works well and the podcast is registered without a problem. However, the "My Podcasts" part of the reciva website also includes an optional "Description" field, "podcastdescription". I'd like to be able to have the script extract the value of the <description> tag from the <channel> section of the feed as this field. Obviously I'd have to add a further &podcastdescription='+????+' and I'm wondering what exactly is needed where I wrote "????" to extract the information stored in the <description> tag.
To give an example, when the bookmark with the above script is clicked whilst looking at this feed (http://xpn.org/podcasts/daytrotter/daytrotterpodcast.xml), the title "Daytrotter on Y-Rock Podcast" is added as the "podcastname" field, the url "http://xpn.org/podcasts/daytrotter/daytrotterpodcast.xml" is added as the "podcasturl" field but I can't seem to find a way of retrieving the contents of <description>, which in this case contains "A podcast version of the weekly Daytrotter Radio feature on Y-Rock on XPN hosted by Sean Moeller". How would I go about this?
Any help would be greatly appreciated.