# -*- coding: utf-8 -*- #!/usr/bin/env python __license__ = 'GPL v3' __copyright__ = u'2011, Silviu Cotoar\u0103' ''' dilemaveche.ro ''' from calibre.web.feeds.news import BasicNewsRecipe class DilemaVeche(BasicNewsRecipe): title = u'Dilema Veche' __author__ = u'Silviu Cotoar\u0103' description = 'Sint vechi, domnule! (I.L. Caragiale)' publisher = u'Adev\u0103rul Holding' oldest_article = 5 language = 'ro' max_articles_per_feed = 100 no_stylesheets = True use_embedded_content = False category = 'Ziare' encoding = 'utf-8' cover_url = 'http://dilemaveche.ro/sites/all/themes/dilema/theme/dilema_two/layouter/dilema_two_homepage/logo.png' conversion_options = { 'comments' : description ,'tags' : category ,'language' : language ,'publisher' : publisher } keep_only_tags = [ dict(name='div', attrs={'class':'c_left_column'}) ] remove_tags = [ dict(name='div', attrs={'id':['adshop_widget_428x60']}) , dict(name='div', attrs={'id':['gallery']}) ] remove_tags_after = [ dict(name='div', attrs={'id':['adshop_widget_428x60']}) ] feeds = [ (u'Feeds', u'http://dilemaveche.ro/rss.xml') ] def preprocess_html(self, soup): return self.adeify_images(soup)