diff --git a/resources/images/news/ionline_pt.png b/resources/images/news/ionline_pt.png new file mode 100644 index 0000000000..f66d4aa797 Binary files /dev/null and b/resources/images/news/ionline_pt.png differ diff --git a/resources/recipes/ionline_pt.recipe b/resources/recipes/ionline_pt.recipe new file mode 100644 index 0000000000..3fe379b0d8 --- /dev/null +++ b/resources/recipes/ionline_pt.recipe @@ -0,0 +1,58 @@ + +__license__ = 'GPL v3' +__copyright__ = '2010, Darko Miletic ' +''' +www.ionline.pt +''' + +from calibre.web.feeds.news import BasicNewsRecipe + +class IOnline_pt(BasicNewsRecipe): + title = 'ionline - Portugal' + __author__ = 'Darko Miletic' + description = 'News from Portugal' + publisher = 'ionline.pt' + category = 'ionline, noticias, portugal, jornal, actualidade, benfica, bolsa, desporto, empresas, globo, europa, futebol, internacional, investir, lisboa, jogos, musica, videos, tempo, meteorologia, pais, politica, porto, sporting, fcporto, televisao, tv, opiniao, nacional, sociedade, crise, financeira, policia, crime, artes, cinema, cultura, madeleine, blog, ciencia, tecnologia, galerias, fotografia, fotos, famosos, emprego, imagens, teatro, news, mundial, governo, ps, psd, be, pcp, cds, pp, partidos' + oldest_article = 2 + max_articles_per_feed = 100 + no_stylesheets = True + encoding = 'utf-8' + use_embedded_content = False + language = 'pt' + extra_css = ' .publish{font-style: italic; line-height: 1.2em; border-bottom: 1px dotted; padding: 5px 0} .entity{line-height: 1.2em} .overview{line-height:1.2em} ' + + conversion_options = { + 'comment' : description + , 'tags' : category + , 'publisher' : publisher + , 'language' : language + } + + keep_only_tags = [ + dict(name=['h5','h1']) + , dict(name='div', attrs={'class':['publish','overview','entity']}) + ] + + remove_tags = [ + dict(name=['object','embed','iframe']) + ] + + + feeds = [ + (u'Portugal' , u'http://www.ionline.pt/rss/portugal.xml' ) + ,(u'Mundo' , u'http://www.ionline.pt/rss/mundo.xml' ) + ,(u'Dinheiro' , u'http://www.ionline.pt/rss/dinheiro.xml' ) + ,(u'Desporto' , u'http://www.ionline.pt/rss/desporto.xml' ) + ,(u'Boa Vida' , u'http://www.ionline.pt/rss/boavida.xml' ) + ,(u'iReporter', u'http://www.ionline.pt/rss/ireporter.xml') + ,(u'iBloges' , u'http://www.ionline.pt/rss/iblogues.xml' ) + ,(u'Desporto' , u'http://www.ionline.pt/rss/desporto.xml' ) + ] + + def print_version(self, url): + rest = url.rpartition('/')[2] + lmain = rest.partition('-')[0] + lurl = u'http://www.ionline.pt/interior/index.php?p=news-print&idNota=' + lmain + return lurl + +