Read The Edge Singapore 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 »

Financial news from Singapore

Language: en

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

Schedule Every morning

			  #!/usr/bin/env  python

__license__   = 'GPL v3'
__copyright__ = '2009, Darko Miletic <darko.miletic at gmail.com>'
'''
www.livemint.com
'''

from calibre.web.feeds.news import BasicNewsRecipe

class Edgesingapore(BasicNewsRecipe):
    title                 = 'The Edge Singapore'
    __author__            = 'Darko Miletic'
    description           = 'Financial news from Singapore'
    publisher             = 'The Edge Singapore'
    category              = 'news, finances, singapore'
    language = 'en'

    lang                  = 'en_SG'
    oldest_article        = 15
    max_articles_per_feed = 100
    no_stylesheets        = True
    encoding              = 'utf-8'
    use_embedded_content  = False
    extra_css             = ' .contentheading{font-size: x-large} .small{font-size: small} .createdate{font-size: small; font-weight: bold} '


    conversion_options = {
                          'comment'          : description
                        , 'tags'             : category
                        , 'publisher'        : publisher
                        , 'author'           : publisher
                        , 'language'         : lang
                        , 'pretty_print'     : True
                        , 'linearize_tables' : True
                        }


    remove_tags = [
                    dict(name=['object','link','embed','form','iframe'])
                   ,dict(name='div',attrs={'id':'toolbar-article'})
                   ,dict(name='div',attrs={'class':'backtotop'})
                   ,dict(name='img',attrs={'alt':'Print'})
                  ]

    remove_tags_after = dict(name='div',attrs={'class':'backtotop'})

    feeds = [(u'Articles', u'http://feeds.feedburner.com/edgesg')]

    def print_version(self, url):
        return url + '?tmpl=component&print=1'

    def preprocess_html(self, soup):
        attribs = [  'style','font','valign'
                    ,'colspan','width','height'
                    ,'rowspan','summary','align'
                    ,'cellspacing','cellpadding'
                    ,'frames','rules','border'
                  ]
        for item in soup.body.findAll(name=['table','td','tr','th','caption','thead','tfoot','tbody','colgroup','col']):
            item.name = 'div'
            for attrib in attribs:
                if item.has_key(attrib):
                   del item[attrib]
        return self.adeify_images(soup)