View Single Post
Old 02-21-2009, 12:49 PM   #14
shinew
Addict
shinew ought to be getting tired of karma fortunes by now.shinew ought to be getting tired of karma fortunes by now.shinew ought to be getting tired of karma fortunes by now.shinew ought to be getting tired of karma fortunes by now.shinew ought to be getting tired of karma fortunes by now.shinew ought to be getting tired of karma fortunes by now.shinew ought to be getting tired of karma fortunes by now.shinew ought to be getting tired of karma fortunes by now.shinew ought to be getting tired of karma fortunes by now.shinew ought to be getting tired of karma fortunes by now.shinew ought to be getting tired of karma fortunes by now.
 
Posts: 309
Karma: 1008082
Join Date: Feb 2009
Location: NYC
Device: Kindle PW, K4 Touch, iPad2, Samsung Galaxy S II
Is it possible possible to add an "update this feed" link to the first page of the converte mobipocket file similar like the one offered from feedbooks, given that i know where the new feed is located? say the new feed location is "http://www.someserver.com/newfeed"

if so could someone provide a sample for The New Yorker feed listed below?

Code:
#!/usr/bin/env  python

__license__   = 'GPL v3'
__copyright__ = '2008, Darko Miletic <darko.miletic at gmail.com>'
'''
newyorker.com
'''

from calibre.web.feeds.news import BasicNewsRecipe

class Newyorker(BasicNewsRecipe):
    title                 = u'The New Yorker'
    __author__            = 'Darko Miletic'
    description           = 'Best of the US journalism'    
    oldest_article        = 7
    max_articles_per_feed = 100
    no_stylesheets        = False
    use_embedded_content  = False

    keep_only_tags = [
                        dict(name='div'  , attrs={'id':'printbody'   })
                     ]
    remove_tags = [
                     dict(name='div'  , attrs={'class':'utils'       })
                    ,dict(name='div'  , attrs={'id':'bottomFeatures' })
                    ,dict(name='div'  , attrs={'id':'articleBottom'  })
                  ]

    feeds          = [
                        (u'The New Yorker', u'http://feeds.newyorker.com/services/rss/feeds/everything.xml')
                     ]

    def print_version(self, url):
        return url + '?printable=true'
thank you!
shinew is offline   Reply With Quote