View Single Post
Old 07-15-2014, 03:28 PM   #2
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,166
Karma: 1410083
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
Kovid,
an update for Carta recipe.

Spoiler:
Code:
__license__   = 'GPL v3'
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'

'''
Fetch Carta.info.
'''

from calibre.web.feeds.news import BasicNewsRecipe


class Carta(BasicNewsRecipe):

    title           = u'Carta'
    description     = 'News about electronic publishing'
    __author__      = 'Armin Geller' # AGe Update 2014-07-15
    
    timefmt                = ' [%a %d %b %Y]'
    oldest_article         = 7
    max_articles_per_feed  = 50
    #no_stylesheets        = True
    #use_embedded_content  = False
    remove_javascript      = True
    encoding               = 'utf-8'
    language               = 'de'

    cover_source   = 'http://carta.info/carta/wp-content/uploads/2012/09/gross.jpg'
    masthead_url   = 'http://www.carta.info/carta/wp-content/themes/carta4/images/logo.png'
    extra_css      =  '''
                      h2 {font-size: 1.3em; font-style: italic}
                      .excerpt {font-size: 1.2em; font-style: italic}
                      '''

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

    remove_tags_after = [
                          dict(name='div', attrs={'class':'the-content'})
                         ]

    remove_tags = [
                   dict(name='div', attrs={'id':['header', 'subnavbar']}),
                   dict(name='div', attrs={'addthis':'title'}),
                   dict(name='p', attrs={'class':'print'}),
                   dict(name='div', attrs={'style':'clear: both;'}),
                   ]


    feeds =  [ (u'Carta', u'http://feeds2.feedburner.com/carta-standard-rss') ]
Attached Files
File Type: rar Carta_AGE 2014-07-15.rar (813 Bytes, 207 views)
Divingduck is offline   Reply With Quote