(self, entry)
return entry
Add additional fields to an RSS item.

        :param feed: The RSS item XML element to use.
Add additional fields to an RSS item.
Add additional fields to an RSS item .
def extend_rss(self, entry):
        '''Add additional fields to an RSS item.

        :param feed: The RSS item XML element to use.
        '''
        ITUNES_NS = 'http://www.itunes.com/dtds/podcast-1.0.dtd'

        if self.__itunes_author:
            author = xml_elem('{%s}author' % ITUNES_NS, entry)
            author.text = self.__itunes_author

        if self.__itunes_block is not None:
            block = xml_elem('{%s}block' % ITUNES_NS, entry)
            block.text = 'yes' if self.__itunes_block else 'no'

        if self.__itunes_image:
            image = xml_elem('{%s}image' % ITUNES_NS, entry)
            image.attrib['href'] = self.__itunes_image

        if self.__itunes_duration:
            duration = xml_elem('{%s}duration' % ITUNES_NS, entry)
            duration.text = self.__itunes_duration

        if self.__itunes_explicit in ('yes', 'no', 'clean'):
            explicit = xml_elem('{%s}explicit' % ITUNES_NS, entry)
            explicit.text = self.__itunes_explicit

        if self.__itunes_is_closed_captioned is not None:
            is_closed_captioned = xml_elem(
                    '{%s}isClosedCaptioned' % ITUNES_NS, entry)
            if self.__itunes_is_closed_captioned:
                is_closed_captioned.text = 'yes'
            else:
                is_closed_captioned.text = 'no'

        if self.__itunes_order is not None and self.__itunes_order >= 0:
            order = xml_elem('{%s}order' % ITUNES_NS, entry)
            order.text = str(self.__itunes_order)

        if self.__itunes_subtitle:
            subtitle = xml_elem('{%s}subtitle' % ITUNES_NS, entry)
            subtitle.text = self.__itunes_subtitle

        if self.__itunes_summary:
            summary = xml_elem('{%s}summary' % ITUNES_NS, entry)
            summary.text = self.__itunes_summary
        return entry
def extend_rss ( self , entry ) : ITUNES_NS = 'http://www.itunes.com/dtds/podcast-1.0.dtd' if self . __itunes_author : author = xml_elem ( '{%s}author' % ITUNES_NS , entry ) author . text = self . __itunes_author if self . __itunes_block is not None : block = xml_elem ( '{%s}block' % ITUNES_NS , entry ) block . text = 'yes' if self . __itunes_block else 'no' if self . __itunes_image : image = xml_elem ( '{%s}image' % ITUNES_NS , entry ) image . attrib [ 'href' ] = self . __itunes_image if self . __itunes_duration : duration = xml_elem ( '{%s}duration' % ITUNES_NS , entry ) duration . text = self . __itunes_duration if self . __itunes_explicit in ( 'yes' , 'no' , 'clean' ) : explicit = xml_elem ( '{%s}explicit' % ITUNES_NS , entry ) explicit . text = self . __itunes_explicit if self . __itunes_is_closed_captioned is not None : is_closed_captioned = xml_elem ( '{%s}isClosedCaptioned' % ITUNES_NS , entry ) if self . __itunes_is_closed_captioned : is_closed_captioned . text = 'yes' else : is_closed_captioned . text = 'no' if self . __itunes_order is not None and self . __itunes_order >= 0 : order = xml_elem ( '{%s}order' % ITUNES_NS , entry ) order . text = str ( self . __itunes_order ) if self . __itunes_subtitle : subtitle = xml_elem ( '{%s}subtitle' % ITUNES_NS , entry ) subtitle . text = self . __itunes_subtitle if self . __itunes_summary : summary = xml_elem ( '{%s}summary' % ITUNES_NS , entry ) summary . text = self . __itunes_summary return entry