Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Recipes

Notices

Reply
 
Thread Tools Search this Thread
Old 02-11-2011, 11:33 AM   #1
rickydh
Junior Member
rickydh began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Feb 2011
Device: Kindle 3
New recipe in Spanish: ABC.es

Hello.

This is my first recipe. It's for national newspaper of Spain.

Code:
__license__   = 'GPL v3'
__author__    = 'Ricardo Jurado'
__copyright__ = 'Ricardo Jurado'
__version__     = 'v0.4'
__date__        = '11 February 2011'

'''
http://www.abc.es/
'''


class AdvancedUserRecipe1296604369(BasicNewsRecipe):
    
    title          = u'ABC.es'
    masthead_url   = 'http://www.abc.es/img/logo-abc.gif'
    cover_url      = 'http://www.abc.es/img/logo-abc.gif'
    publisher      = u'Grupo VOCENTO'

    __author__            = 'Ricardo Jurado'
    description           = 'Noticias de Spain y el mundo'
    category              = 'News,Spain,National,International,Economy'
    oldest_article = 2
    max_articles_per_feed = 10

    no_stylesheets = True
    use_embedded_content = False
    encoding = 'ISO-8859-1'
    remove_javascript = True
    language = 'es'

    extra_css             = """
                               p{text-align: justify; font-size: 100%}
                               body{ text-align: left; font-size:100% }
                               h3{font-family: sans-serif; font-size:120%; font-weight:bold; text-align: justify; }
                               h2{font-family: sans-serif; font-size:100%; font-weight:bold; text-align: justify; }
                               h1{font-family: sans-serif; font-size:150%; font-weight:bold; text-align: justify; }
                                 """					   

    keep_only_tags = [
#                 dict(name='h2', attrs={'class':['logos']}),
                 dict(name='h3', attrs={'class':['overhead']}),
                 dict(name='h1', attrs={'class':'headline'}),
                 dict(name='h3', attrs={'class':['subhead']}),
                 dict(name='div', attrs={'class':'datosi'}),
                 dict(name='div', attrs={'class':'photo-alt1'}),
                 dict(name='div', attrs={'class':'text'})
                 ]    

#    remove_tags_before = dict(name='div' , attrs={'id':['cabecera2']})

    feeds          = [
                     (u'PORTADA', u'http://www.abc.es/rss/feeds/abcPortada.xml')
                    ,(u'ULTIMAS', u'http://www.abc.es/rss/feeds/abc_ultima.xml')
                    ,(u'NACIONAL', u'http://www.abc.es/rss/feeds/abc_EspanaEspana.xml')
                    ,(u'INTERNACIONAL', u'http://www.abc.es/rss/feeds/abc_Internacional.xml')
                    ,(u'OPINION', u'http://www.abc.es/rss/feeds/abc_opinioncompleto.xml')
                    ,(u'BLOGS ABC', u'http://www.abc.es/rss/feeds/blogs-abc.xml')
                    ,(u'ECONOMIA', u'http://www.abc.es/rss/feeds/abc_Economia.xml')
                    ,(u'CIENCIA Y TECNOLOGIA', u'http://www.abc.es/rss/feeds/abc_Ciencia_Tecnologia.xml')
                    ,(u'CULTURA', u'http://www.abc.es/rss/feeds/abc_Cultura.xml')
                    ,(u'LIBROS', u'http://www.abc.es/rss/feeds/abc_Libros.xml')
                    ,(u'MEDIOS Y REDES', u'http://www.abc.es/rss/feeds/ABC_Medios_Redes.xml')
                    ,(u'EVASION', u'http://www.abc.es/rss/feeds/abc_evasion.xml')
                    ,(u'ESPECTACULOS', u'http://www.abc.es/rss/feeds/abc_Espectaculos.xml')
                    ,(u'GENTE', u'http://www.abc.es/rss/feeds/abc_Gente.xml')
                    ,(u'DEPORTES', u'http://www.abc.es/rss/feeds/abc_Deportes.xml')
                     ]
--
Regards,
Ricardo.
rickydh is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Recipe for ABC News (Australia) RedDogInCan Recipes 5 11-20-2011 10:16 AM
Updated recipe: El periódico de Aragón (Spanish) desUBIKado Recipes 0 02-10-2011 02:17 PM
One new recipe and other one updated (In Spanish) desUBIKado Recipes 3 01-19-2011 03:58 AM


All times are GMT -4. The time now is 06:15 PM.


MobileRead.com is a privately owned, operated and funded community.