diff --git a/resources/images/news/alo_novine.png b/resources/images/news/alo_novine.png new file mode 100644 index 0000000000..569ea16fce Binary files /dev/null and b/resources/images/news/alo_novine.png differ diff --git a/resources/recipes/akter.recipe b/resources/recipes/akter.recipe index 3959fff717..0f2fb05640 100644 --- a/resources/recipes/akter.recipe +++ b/resources/recipes/akter.recipe @@ -15,7 +15,7 @@ class Akter(BasicNewsRecipe): category = 'vesti, online vesti, najnovije vesti, politika, sport, ekonomija, biznis, finansije, berza, kultura, zivot, putovanja, auto, automobili, tehnologija, politicki magazin, dogadjaji, desavanja, lifestyle, zdravlje, zdravstvo, vest, novine, nedeljnik, srbija, novi sad, vojvodina, svet, drustvo, zabava, republika srpska, beograd, intervju, komentar, reportaza, arhiva vesti, news, serbia, politics' oldest_article = 8 max_articles_per_feed = 100 - no_stylesheets = False + no_stylesheets = True use_embedded_content = False encoding = 'utf-8' masthead_url = 'http://www.akter.co.rs/templates/gk_thenews2/images/style2/logo.png' @@ -23,9 +23,9 @@ class Akter(BasicNewsRecipe): publication_type = 'magazine' remove_empty_feeds = True PREFIX = 'http://www.akter.co.rs' - extra_css = """ @font-face {font-family: "serif1";src:url(res:///opt/sony/ebook/FONT/tt0011m_.ttf)} + extra_css = """ @font-face {font-family: "sans1";src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf)} - .article_description,body,.lokacija{font-family: Arial,Helvetica,sans1,sans-serif} + .article_description,body{font-family: Arial,Helvetica,sans1,sans-serif} .color-2{display:block; margin-bottom: 10px; padding: 5px, 10px; border-left: 1px solid #D00000; color: #D00000} img{margin-bottom: 0.8em} """ diff --git a/resources/recipes/alo_novine.recipe b/resources/recipes/alo_novine.recipe new file mode 100644 index 0000000000..45e53e99e8 --- /dev/null +++ b/resources/recipes/alo_novine.recipe @@ -0,0 +1,65 @@ +__license__ = 'GPL v3' +__copyright__ = '2010, Darko Miletic ' + +''' +www.alo.rs +''' + +import re +from calibre.web.feeds.recipes import BasicNewsRecipe + +class Alo_Novine(BasicNewsRecipe): + title = 'Alo!' + __author__ = 'Darko Miletic' + description = "News Portal from Serbia" + publisher = 'Alo novine d.o.o.' + category = 'news, politics, Serbia' + oldest_article = 2 + max_articles_per_feed = 100 + delay = 4 + no_stylesheets = True + encoding = 'utf-8' + use_embedded_content = False + language = 'sr' + extra_css = """ + @font-face {font-family: "sans1";src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf)} + .article_description,body{font-family: Arial,Helvetica,sans1,sans-serif} + .lead {font-size: 1.3em} + h1{color: #DB0700} + .article_uvod{font-style: italic; font-size: 1.2em} + img{margin-bottom: 0.8em} """ + + conversion_options = { + 'comment' : description + , 'tags' : category + , 'publisher': publisher + , 'language' : language + } + + preprocess_regexps = [(re.compile(u'\u0110'), lambda match: u'\u00D0')] + + remove_tags = [dict(name=['object','link','embed'])] + remove_attributes = ['height','width'] + + feeds = [ + (u'Najnovije Vijesti', u'http://www.alo.rs/rss/danasnje_vesti') + ,(u'Politika' , u'http://www.alo.rs/rss/politika') + ,(u'Vesti' , u'http://www.alo.rs/rss/vesti') + ,(u'Sport' , u'http://www.alo.rs/rss/sport') + ,(u'Ljudi' , u'http://www.alo.rs/rss/ljudi') + ,(u'Saveti' , u'http://www.alo.rs/rss/saveti') + ] + + def preprocess_html(self, soup): + for item in soup.findAll(style=True): + del item['style'] + return soup + + def print_version(self, url): + artl = url.rpartition('/')[0] + artid = artl.rpartition('/')[2] + return 'http://www.alo.rs/resources/templates/tools/print.php?id=' + artid + + def image_url_processor(self, baseurl, url): + return url.replace('alo.rs//','alo.rs/') +