Whats the best way to pass html embed code via rss feed to a rss parser in php?

后端 未结 5 590
小蘑菇
小蘑菇 2021-01-20 21:52

Im trying to put an html embed code for a flash video into the rss feed, which will then be parser by a parser (magpie) on my other site. How shoul

5条回答
  •  天涯浪人
    2021-01-20 22:23

    Instead of writing your own RSS XML feed, consider using the Django syndication framework from django.contrib.syndication:

    https://docs.djangoproject.com/en/dev/ref/contrib/syndication/

    It also supports enclosures, which is the RSS way for embedding images or video.

    For custom tags, there is also an lowlevel API which allows you to change the XML: https://docs.djangoproject.com/en/dev/ref/contrib/syndication/#the-low-level-framework

提交回复
热议问题