Read El Faro de Vigo 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 de Vigo

Language: es

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

Schedule Every morning

			  from calibre.web.feeds.news import BasicNewsRecipe

class ElFaroDeVigo(BasicNewsRecipe):
    title          = u'El Faro de Vigo'
    oldest_article = 1
    max_articles_per_feed = 100
    __author__  = 'Jefferson Frantz'
    description = 'Noticias de Vigo'
    timefmt = ' [%d %b, %Y]'
    language = 'es'
    encoding               = 'cp1252'
    no_stylesheets = True
    remove_javascript = True

    feeds          = [
##                        (u'Vigo', u'http://www.farodevigo.es/elementosInt/rss/1'),
##                        (u'Gran Vigo', u'http://www.farodevigo.es/elementosInt/rss/2'),
                        (u'Galicia', u'http://www.farodevigo.es/elementosInt/rss/4'),
                        (u'España', u'http://www.farodevigo.es/elementosInt/rss/6'),
                        (u'Mundo', u'http://www.farodevigo.es/elementosInt/rss/7'),
##                        (u'Opinión', u'http://www.farodevigo.es/elementosInt/rss/5'),
                        (u'Economía', u'http://www.farodevigo.es/elementosInt/rss/10'),
                        (u'Sociedad y Cultura', u'http://www.farodevigo.es/elementosInt/rss/8'),
                        (u'Sucesos', u'http://www.farodevigo.es/elementosInt/rss/9'),
                        (u'Deportes', u'http://www.farodevigo.es/elementosInt/rss/11'),
                        (u'Agenda', u'http://www.farodevigo.es/elementosInt/rss/21'),
                        (u'Gente', u'http://www.farodevigo.es/elementosInt/rss/24'),
                        (u'Televisión', u'http://www.farodevigo.es/elementosInt/rss/25'),
                        (u'Ciencia y Tecnología', u'http://www.farodevigo.es/elementosInt/rss/26')]

    extra_css              = '''.noticia_texto{ font-family: sans-serif; font-size: medium; text-align: justify }
                                h1{font-family: serif; font-size: x-large; font-weight: bold; color: #000000; text-align: center}
                                h2{font-family: serif; font-size: medium; font-weight: bold; color: #000000; text-align: left}
                                .enlacenegrita10{font-family: serif; font-size: small; font-weight: bold; color: #000000; text-align: left}
                                .noticia_titular{font-family: serif; font-size: x-large; font-weight: bold; color: #000000; text-align: center}'''


    def preprocess_html(self, soup):
            for item in soup.findAll(style=True):
               del item['style']

            url = 'http://estaticos00.farodevigo.es//elementosWeb/mediaweb/images/compartir/barrapunto.gif'
            fitem = soup.find('img',src=url)
            if fitem:
               par = fitem.parent
               par.extract()
            url = 'http://estaticos01.farodevigo.es//elementosWeb/mediaweb/images/compartir/barrapunto.gif'
            fitem = soup.find('img',src=url)
            if fitem:
               par = fitem.parent
               par.extract()
            url = 'http://estaticos02.farodevigo.es//elementosWeb/mediaweb/images/compartir/barrapunto.gif'
            fitem = soup.find('img',src=url)
            if fitem:
               par = fitem.parent
               par.extract()

            return self.adeify_images(soup)

    def postprocess_html(self, soup, first_fetch):
        divs = soup.findAll(True, {'class':'enlacenegrita10'})
        for div in divs:
            div['align'] = 'left'

        return soup


    keep_only_tags = [dict(name='div', attrs={'class':['noticias']})]

    remove_tags        = [
                             dict(name=['object','link','script','ul','iframe','ol'])
                            ,dict(name='div', attrs={'class':['noticiadd2', 'cintillo2', 'noticiadd', 'noticiadd2']})
                            ,dict(name='div', attrs={'class':['imagen_derecha', 'noticiadd3', 'extraHTML']})

                         ]