There are several different approaches. The easiest way is probably to save a unique key or hash from the last article received for each feed that your program is associated with. This may be a combination of the article title and date, or even md5sum of the entire content of the article.
Then you can write this data to the XML status file for your script or use something like cpickle to save the data.Then each time your program starts, retrieve only the articles that are the most recent (checking each of your latest hash articles from the last run).
And, of course, don't forget to update your latest article feed hash before the script is released.
If your script deals with multiple channels, you will need to save one of these "last items of the article hash" on each channel.
source share