Read El Periodico de Aragon on your iPad or Kindle in no time. Click download to load the free ebook on your reader.

Check out all the available public recipes or write your own with these quick start guides. ReadBeam is built on calibre, so everything in the docs and the fora applies here as well.

Download for free »

Noticias desde Aragon

Language: es

Requires Subscription: No, it's available as free ebook

Schedule Every morning

			  #!/usr/bin/env  python
# -*- coding: utf-8 -*-

__license__     = 'GPL v3'
__copyright__   = '04 December 2010, desUBIKado'
__author__      = 'desUBIKado'
__description__ = 'Daily newspaper from Aragon'
__version__     = 'v0.08'
__date__        = '13, November 2011'
'''
elperiodicodearagon.com
'''
from calibre.web.feeds.news import BasicNewsRecipe


class elperiodicodearagon(BasicNewsRecipe):
    title                 = u'El Periodico de Aragon'
    __author__            = u'desUBIKado'
    description           = u'Noticias desde Aragon'
    publisher             = u'elperiodicodearagon.com'
    category              = u'news, politics, Spain, Aragon'
    oldest_article        = 1
    delay                 = 0
    max_articles_per_feed = 100
    no_stylesheets        = True
    use_embedded_content  = False
    language              = 'es'
    encoding              = 'iso-8859-1'
    remove_empty_feeds    = True
    remove_javascript     = True


    conversion_options = {
                             'comments'  : description
                            ,'tags'      : category
                            ,'language'  : language
                            ,'publisher' : publisher
                         }

    feeds              = [
                           (u'Portada', u'http://zetaestaticos.com/aragon/rss/portada_es.xml'),
                           (u'Arag\xf3n', u'http://zetaestaticos.com/aragon/rss/2_es.xml'),
                           (u'Internacional', u'http://zetaestaticos.com/aragon/rss/4_es.xml'),
                           (u'Espa\xf1a', u'http://zetaestaticos.com/aragon/rss/3_es.xml'),
                           (u'Econom\xeda', u'http://zetaestaticos.com/aragon/rss/5_es.xml'),
                           (u'Deportes', u'http://zetaestaticos.com/aragon/rss/7_es.xml'),
                           (u'Real Zaragoza', u'http://zetaestaticos.com/aragon/rss/10_es.xml'),
                           (u'CAI Zaragoza', u'http://zetaestaticos.com/aragon/rss/91_es.xml'),
                           (u'Monta\xf1ismo', u'http://zetaestaticos.com/aragon/rss/354_es.xml'),
                           (u'Opini\xf3n', u'http://zetaestaticos.com/aragon/rss/103_es.xml'),
                           (u'Tema del d\xeda', u'http://zetaestaticos.com/aragon/rss/102_es.xml'),
                           (u'Escenarios', u'http://zetaestaticos.com/aragon/rss/105_es.xml'),
                           (u'Sociedad', u'http://zetaestaticos.com/aragon/rss/104_es.xml'),
                           (u'Gente', u'http://zetaestaticos.com/aragon/rss/330_es.xml'),
                           (u'Espacio 3', u'http://zetaestaticos.com/aragon/rss/328_es.xml'),
                           (u'Fiestas del Pilar', u'http://zetaestaticos.com/aragon/rss/107_es.xml')
                         ]


    remove_attributes = ['height','width']

    keep_only_tags     = [dict(name='div', attrs={'id':'Noticia'})]


    # Recuperamos la portada de papel (la imagen format=1 tiene mayor resolucion)

    def get_cover_url(self):
        index = 'http://pdf.elperiodicodearagon.com/'
        soup = self.index_to_soup(index)
        for image in soup.findAll('img',src=True):
           if image['src'].startswith('http://pdf.elperiodicodearagon.com/funciones/portada-preview.php?eid='):
              return image['src'].rstrip('format=2') + 'format=1'
        return None

    # Usamos la versión para móviles

    def print_version(self, url):
          return url.replace('http://www.elperiodicodearagon.com/', 'http://www.elperiodicodearagon.com/m/')