Eubolist's Blog

about IT, Linux, the web and much more

Python Script: Merge and sort multiple RSS Feed items in one Feed

with 3 comments

In my first blog post a while back I wrote about showrss and how to concatenate multiple tv-shows into one personalized rss feed.

I’ve been using their service for about a year now and am quite happy with it. Sadly though, despite multiple requests, they haven’t included National Geographic and Discovery Channel documentaries yet. So today I took the time and wrote customfeed, a little python script that is able to fetch multiple feeds, sort the items and concatenate them in the right order to a new feed. Although I wrote the script for use with ezRSS feeds, it should work just as well with any other feeds (might need some little modifications or tweaks though).

The script depends on python-feedparser, so make sure you have that one installed:

sudo aptitude install python-feedparser

or:

sudo easy_install feedparser

The most convenient way is to set up a cronjob that executes customfeed.py every few hours or so. Mine looks like this:

24 */6 * * * /usr/local/bin/customfeed.py

Advertisements

Written by eubolist

2010/12/24 at 02:12

3 Responses

Subscribe to comments with RSS.

  1. […] are also more advanced coding options with Python, PHP and Simple Pie. I haven’t spent enough time with wordpress.org to investigate Simple Pie […]

  2. stronzo tu, wuala, il cloud e gli errori 404 in genere
    Cordialità.

    un cretino

    2014/05/04 at 03:12

  3. The file don’t exist anymore

    AS

    2015/09/04 at 16:34


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: