View Single Post
Old 02-23-2016, 01:23 AM   #2
rty
Zealot
rty got an A in P-Chem.rty got an A in P-Chem.rty got an A in P-Chem.rty got an A in P-Chem.rty got an A in P-Chem.rty got an A in P-Chem.rty got an A in P-Chem.rty got an A in P-Chem.rty got an A in P-Chem.rty got an A in P-Chem.rty got an A in P-Chem.
 
Posts: 108
Karma: 6066
Join Date: Apr 2010
Location: Singapore
Device: iPad Air, Kindle DXG, Kindle Paperwhite
I also notice that the recipe for Asiaone, another news portal in Singapore, is no longer working properly. I don't know if I should create a new thread for it, but here is the recipe I have already fixed:

Code:
#!/usr/bin/env  python2

__license__   = 'GPL v3'
__copyright__ = '2009, Bruce <bruce at dotdoh.com>'
'''
asiaone.com
'''

from calibre.web.feeds.news import BasicNewsRecipe

class AsiaOne(BasicNewsRecipe):
    title          = u'AsiaOne'
    oldest_article = 2
    max_articles_per_feed = 100
    __author__     = 'Bruce'
    description    = 'News from Singapore Press Holdings Portal'
    no_stylesheets = False
    language = 'en_SG'
    remove_javascript = True
    remove_tags    = [dict(name='span', attrs={'class':'footer'})]
    keep_only_tags = [
                        dict(name='h1', attrs={'class':'headline'}),
                        dict(name='div', attrs={'class':['article-content','person-info row']})
                    ]



    feeds          = [
                      ('Singapore', 'http://asiaone.feedsportal.com/c/34151/f/618415/index.rss'),
                      ('Asia', 'http://asiaone.feedsportal.com/c/34151/f/618416/index.rss')

                    ]
Note: I only included feeds for Singapore and Asia and didn't include the rest because when I tried to include "World" feed, the size (of MOBI file) was swollen to over 50MB.

Last edited by rty; 02-23-2016 at 01:25 AM.
rty is offline   Reply With Quote