View Single Post
Old 10-13-2013, 09:52 AM   #1
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
Carta [DE] update

Kovid,
It looks like Carta had a little coding change on the print page. I made a small update for this recipe to get rid of the footer.


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__ = 'Oliver Niesner' # AGe Update 2013-10-13
    use_embedded_content   = False
    timefmt = ' [%a %d %b %Y]'
    oldest_article = 7
    max_articles_per_feed = 50
    no_stylesheets = True
    remove_javascript = True
    #html2epub_options = 'linearize_tables = True\nbase_font_size2=14'
    encoding = 'utf-8'
    language = 'de'



    remove_tags_after = [dict(name='div', attrs={'id':'BlogContent'})] # AGe 2013-10-13

    remove_tags = [dict(name='p', attrs={'class':'print'}),
                   dict(name='p', attrs={'class':'tags-blog'}),
                   dict(name='p', attrs={'class':'mail'}),
                   dict(name='p', attrs={'style':'text-align: center;'}),
                   dict(name='p', attrs={'align':'left'}),
                   dict(name='p', attrs={'class':'date'}),
                   dict(id='comments'),
                   dict(id='headerleft'),
                   dict(id='subnav'),
                   dict(id='headerright')]


    feeds =  [ (u'Carta', u'http://feeds2.feedburner.com/carta-standard-rss') ]


    def print_version(self, url):
        return url + 'print/'
Attached Files
File Type: zip Carta_AGE 2013-10-13.zip (781 Bytes, 297 views)
Divingduck is offline   Reply With Quote