__license__ = 'GPL v3' __copyright__ = '2014, Darko Miletic ' ''' www.wired.com ''' from calibre.web.feeds.news import BasicNewsRecipe class WiredDailyNews(BasicNewsRecipe): title = 'Wired Daily Edition' __author__ = 'Darko Miletic' description = ('Wired is a full-color monthly American magazine, published in both print ' 'and online editions, that reports on how emerging technologies affect culture,' 'the economy and politics.') publisher = 'Conde Nast' category = 'news, IT, computers, technology' oldest_article = 2 max_articles_per_feed = 200 no_stylesheets = True encoding = 'utf-8' use_embedded_content = False language = 'en' ignore_duplicate_articles = {'url'} remove_empty_feeds = True publication_type = 'newsportal' extra_css = """ .entry-header{ text-transform: uppercase; vertical-align: baseline; display: inline; } ul li{display: inline} """ remove_tags = [ dict(name=['meta','link']), dict(name='div', attrs={'class':'podcast_storyboard'}), dict(id=['sharing', 'social', 'article-tags', 'sidebar']), ] keep_only_tags=[ dict(attrs={'data-js':['post', 'postHeader']}), ] feeds = [ (u'Top Stories' , u'http://feeds.wired.com/wired/index') ,(u'Product reviews' , u'http://feeds.wired.com/WiredReviews') ,(u'Autopia' , u'http://feeds.wired.com/wiredautopia') ,(u'Business' , u'http://feeds.wired.com/wiredbusinessblog') ,(u'Danger Room' , u'http://feeds.wired.com/WiredDangerRoom') ,(u'Gadget Lab' , u'http://feeds.wired.com/GearFactor') ,(u'Game Life' , u'http://feeds.wired.com/Gamelife') ,(u'GeekMom' , u'http://feeds.wired.com/wiredgeekmom/') ,(u'Innovation Insights', u'http://feeds.wired.com/wiredinsights') ,(u'Opinion' , u'http://feeds.wired.com/wiredopinion/') ,(u'Playbook' , u'http://feeds.wired.com/wiredplaybook/') ,(u'This day in Tech' , u'http://feeds.wired.com/ThisDayInTech') ,(u'Threat level' , u'http://feeds.wired.com/wired27b') ,(u'Design' , u'http://feeds.wired.com/wired/design') ,(u'Underwire' , u'http://feeds.wired.com/wiredunderwire') ,(u'Enterprise' , u'http://feeds.wired.com/wiredenterprise/') ,(u'Science' , u'http://feeds.wired.com/wiredscience') ] def get_article_url(self, article): return article.get('guid', None)