#!/usr/bin/env python __license__ = 'GPL v3' __copyright__ = '2010, Brendan Sleight <bms.calibre at barwap.com>' ''' hackaday.com ''' from calibre.web.feeds.news import BasicNewsRecipe class Hackaday(BasicNewsRecipe): title = u'Hackaday' __author__ = 'bmsleight' description = 'Hack a Day serves up fresh hacks each day, every day from around the web and a special How-To hack each week.' oldest_article = 10 max_articles_per_feed = 100 no_stylesheets = True language = 'en' use_embedded_content = False keep_only_tags = [ dict(name='div', attrs={'class':'post'}) ,dict(name='div', attrs={'class':'commentlinks'}) ] feeds = [ (u'Hack A Day' , u'http://hackaday.com/feed/' ) ] def get_article_url(self, article): url = article.get('guid', None) return url