diff --git a/recipes/granma.recipe b/recipes/granma.recipe index 8f2dfebba1..157e04633e 100644 --- a/recipes/granma.recipe +++ b/recipes/granma.recipe @@ -1,9 +1,9 @@ #!/usr/bin/env python2 __license__ = 'GPL v3' -__copyright__ = '2008-2009, Darko Miletic ' +__copyright__ = '2008-2019, Darko Miletic ' ''' -granma.cubaweb.cu +granma.cu ''' from calibre.web.feeds.news import BasicNewsRecipe @@ -19,33 +19,10 @@ class Granma(BasicNewsRecipe): max_articles_per_feed = 100 no_stylesheets = True use_embedded_content = False - encoding = 'cp1252' - cover_url = 'http://www.granma.cubaweb.cu/imagenes/granweb229d.jpg' + encoding = 'utf8' + masthead_url = 'http://www.granma.cu/static/img/granma-logo.png' language = 'es_CU' - + auto_cleanup = True remove_javascript = True - html2lrf_options = [ - '--comment', description, '--category', category, '--publisher', publisher, '--ignore-tables' - ] - - html2epub_options = 'publisher="' + publisher + '"\ncomments="' + \ - description + '"\ntags="' + category + '"\nlinearize_tables=True' - - keep_only_tags = [dict(name='table', attrs={'height': '466'})] - - remove_tags = [dict(name=['embed', 'link', 'object'])] - - feeds = [(u'Noticias', u'http://www.granma.cubaweb.cu/noticias.xml')] - - def preprocess_html(self, soup): - mtag = '' - soup.head.insert(0, mtag) - for item in soup.findAll('table'): - if item.has_key('width'): # noqa - del item['width'] - if item.has_key('height'): # noqa - del item['height'] - for item in soup.findAll(style=True): - del item['style'] - return soup + feeds = [(u'Noticias', u'http://www.granma.cu/feed')] diff --git a/recipes/icons/granma.png b/recipes/icons/granma.png index d80760470b..592a73bc60 100644 Binary files a/recipes/icons/granma.png and b/recipes/icons/granma.png differ