| 1 |
__license__ = 'GPL v3' |
| 2 |
__copyright__ = '2012, Darko Miletic <darko.miletic at gmail.com>' |
| 3 |
''' |
| 4 |
port.pravda.ru |
| 5 |
''' |
| 6 |
|
| 7 |
from calibre.web.feeds.news import BasicNewsRecipe |
| 8 |
|
| 9 |
|
| 10 |
class Pravda_port(BasicNewsRecipe): |
| 11 |
title = 'Pravda em português' |
| 12 |
__author__ = 'Darko Miletic' |
| 13 |
description = 'News from Russia and rest of the world' |
| 14 |
publisher = 'PRAVDA.Ru' |
| 15 |
category = 'news, politics, Russia' |
| 16 |
oldest_article = 2 |
| 17 |
max_articles_per_feed = 200 |
| 18 |
no_stylesheets = True |
| 19 |
encoding = 'utf8' |
| 20 |
use_embedded_content = False |
| 21 |
language = 'pt' |
| 22 |
remove_empty_feeds = True |
| 23 |
publication_type = 'newspaper' |
| 24 |
masthead_url = 'http://port.pravda.ru/pix/logo.gif' |
| 25 |
extra_css = ''' |
| 26 |
body{font-family: Arial,sans-serif } |
| 27 |
img{margin-bottom: 0.4em; display:block} |
| 28 |
''' |
| 29 |
|
| 30 |
conversion_options = {'comment': description, 'tags': category, 'publisher': publisher, 'language': language} |
| 31 |
|
| 32 |
remove_attributes = ['lang', 'style'] |
| 33 |
keep_only_tags = [dict(name='div', attrs={'id': 'article'})] |
| 34 |
|
| 35 |
feeds = [ |
| 36 |
('Mundo', 'http://port.pravda.ru/mundo/export-articles.xml'), |
| 37 |
('Russia', 'http://port.pravda.ru/russa/export-articles.xml'), |
| 38 |
('Sociedade', 'http://port.pravda.ru/sociedade/export-articles.xml'), |
| 39 |
('Cultura', 'http://port.pravda.ru/sociedade/cultura/export-articles.xml'), |
| 40 |
('Ciencia', 'http://port.pravda.ru/science/export-articles.xml'), |
| 41 |
('Desporto', 'http://port.pravda.ru/desporto/export-articles.xml'), |
| 42 |
('CPLP', 'http://port.pravda.ru/cplp/export-articles.xml'), |
| 43 |
] |
| 44 |
|
| 45 |
def print_version(self, url): |
| 46 |
return url + '?mode=print' |