View Single Post
Old 02-10-2013, 10:53 AM   #14
surf
Member
surf began at the beginning.
 
Posts: 22
Karma: 10
Join Date: Feb 2013
Device: kindle
Quote:
Originally Posted by kovidgoyal View Post
Simply add the original-id attribute yourself before parsing using the uuid module.
Hi Kovid, I include following code to avoid exporting/sending blank ePub,
but it does not work and blank ePub would still be produced incase of no new feeds published.
Could you have a look? Thanks!

Code:
    def parse_feeds(self):

        feeds = BasicNewsRecipe.parse_feeds(self)

        remove = [f for f in feeds if len(f) == 0 and
                self.remove_empty_feeds]
        for f in remove:
            feeds.remove(f)

        if  len(feeds) == 0: self.abort_recipe_processing('');

        return feeds
surf is offline   Reply With Quote