From 039d2ae54f0bf8a3be4cbffa8a48ee602925f44c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 19 Aug 2011 21:57:04 -0600 Subject: [PATCH] Fluter by Armin Geller --- recipes/brasil_de_fato.recipe | 62 +++++++++++++++++------------------ recipes/fluter_de.recipe | 39 ++++++++++++++++++++++ 2 files changed, 70 insertions(+), 31 deletions(-) create mode 100644 recipes/fluter_de.recipe diff --git a/recipes/brasil_de_fato.recipe b/recipes/brasil_de_fato.recipe index ba7636c703..d060544ece 100644 --- a/recipes/brasil_de_fato.recipe +++ b/recipes/brasil_de_fato.recipe @@ -1,31 +1,31 @@ -# -*- coding: utf-8 -*- - -from calibre.web.feeds.news import BasicNewsRecipe - -class BrasilDeFato(BasicNewsRecipe): - news = True - title = u'Brasil de Fato' - __author__ = 'Alex Mitrani' - description = u'Uma visão popular do Brasil e do mundo.' - publisher = u'SOCIEDADE EDITORIAL BRASIL DE FATO' - category = 'news, politics, Brazil, rss, Portuguese' - oldest_article = 10 - max_articles_per_feed = 100 - summary_length = 1000 - language = 'pt_BR' - - remove_javascript = True - no_stylesheets = True - use_embedded_content = False - remove_empty_feeds = True - masthead_url = 'http://www.brasildefato.com.br/sites/default/files/zeropoint_logo.jpg' - keep_only_tags = [dict(name='div', attrs={'id':'main'})] - remove_tags = [dict(name='div', attrs={'class':'links'})] - remove_tags_after = [dict(name='div', attrs={'class':'links'})] - - feeds = [(u'Nacional', u'http://www.brasildefato.com.br/rss_nacional') - ,(u'Internacional', u'http://www.brasildefato.com.br/rss_internacional') - ,(u'Entrevista', u'http://www.brasildefato.com.br/rss_entrevista') - ,(u'Cultura', u'http://www.brasildefato.com.br/rss_cultura') - ,(u'Análise', u'http://www.brasildefato.com.br/rss_analise') - ] +# -*- coding: utf-8 -*- + +from calibre.web.feeds.news import BasicNewsRecipe + +class BrasilDeFato(BasicNewsRecipe): + news = True + title = u'Brasil de Fato' + __author__ = 'Alex Mitrani' + description = u'Uma visão popular do Brasil e do mundo.' + publisher = u'SOCIEDADE EDITORIAL BRASIL DE FATO' + category = 'news, politics, Brazil, rss, Portuguese' + oldest_article = 10 + max_articles_per_feed = 100 + summary_length = 1000 + language = 'pt_BR' + + remove_javascript = True + no_stylesheets = True + use_embedded_content = False + remove_empty_feeds = True + masthead_url = 'http://www.brasildefato.com.br/sites/default/files/zeropoint_logo.jpg' + keep_only_tags = [dict(name='div', attrs={'id':'main'})] + remove_tags = [dict(name='div', attrs={'class':'links'})] + remove_tags_after = [dict(name='div', attrs={'class':'links'})] + + feeds = [(u'Nacional', u'http://www.brasildefato.com.br/rss_nacional') + ,(u'Internacional', u'http://www.brasildefato.com.br/rss_internacional') + ,(u'Entrevista', u'http://www.brasildefato.com.br/rss_entrevista') + ,(u'Cultura', u'http://www.brasildefato.com.br/rss_cultura') + ,(u'Análise', u'http://www.brasildefato.com.br/rss_analise') + ] diff --git a/recipes/fluter_de.recipe b/recipes/fluter_de.recipe new file mode 100644 index 0000000000..1f8576cf81 --- /dev/null +++ b/recipes/fluter_de.recipe @@ -0,0 +1,39 @@ +__license__ = 'GPL v3' +__copyright__ = '2008, Kovid Goyal ' + +''' +Fetch fluter.de +''' + +from calibre.web.feeds.news import BasicNewsRecipe + +class AdvancedUserRecipe1313693926(BasicNewsRecipe): + + title = u'Fluter' + description = 'fluter.de Magazin der Bundeszentrale für politische Bildung/bpb' + language = 'de' + encoding = 'UTF-8' + + __author__ = 'Armin Geller' # 2011-08-19 + + oldest_article = 7 + max_articles_per_feed = 50 + + + remove_tags = [ + dict(name='div', attrs={'id':["comments"]}), + dict(attrs={'class':['commentlink']}), + ] + + + keep_only_tags = [ + dict(name='div', attrs={'class':["grid_8 articleText"]}), + dict(name='div', attrs={'class':["articleTextInnerText"]}), + ] + + feeds = [ + (u'Inhalt:', u'http://www.fluter.de/de/?tpl=907'), + ] + + extra_css = '.cs_img {margin-right: 10pt;}' +