mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Update AsiaOne
This commit is contained in:
parent
efcd5b78ae
commit
eda12b1507
@ -10,25 +10,21 @@ from calibre.web.feeds.news import BasicNewsRecipe
|
|||||||
|
|
||||||
class AsiaOne(BasicNewsRecipe):
|
class AsiaOne(BasicNewsRecipe):
|
||||||
title = u'AsiaOne'
|
title = u'AsiaOne'
|
||||||
oldest_article = 3
|
oldest_article = 2
|
||||||
max_articles_per_feed = 100
|
max_articles_per_feed = 100
|
||||||
__author__ = 'Bruce'
|
__author__ = 'Bruce'
|
||||||
description = 'News from Singapore Press Holdings Portal'
|
description = 'News from Singapore Press Holdings Portal'
|
||||||
no_stylesheets = False
|
no_stylesheets = False
|
||||||
language = 'en_SG'
|
language = 'en_SG'
|
||||||
|
remove_javascript = True
|
||||||
remove_tags = [dict(name='span', attrs={'class':'footer'})]
|
remove_tags = [dict(name='span', attrs={'class':'footer'})]
|
||||||
keep_only_tags = [dict(name=['span', 'p', 'br', 'b', 'i', 'hr'])]
|
keep_only_tags = [
|
||||||
|
dict(name='h1', attrs={'class':'headline'}),
|
||||||
|
dict(name='div', attrs={'class':['article-content','person-info row']})
|
||||||
|
|
||||||
feeds = [
|
|
||||||
('News', 'http://www.asiaone.com/a1mborss/News.xml'),
|
|
||||||
('Business', 'http://www.asiaone.com/a1mborss/Business.xml'),
|
|
||||||
('Education', 'http://www.asiaone.com/a1mborss/Education.xml'),
|
|
||||||
('Health', 'http://www.asiaone.com/a1mborss/Health.xml'),
|
|
||||||
('Digital', 'http://www.asiaone.com/a1mborss/Digital.xml'),
|
|
||||||
]
|
]
|
||||||
|
|
||||||
def print_version(self, url):
|
feeds = [
|
||||||
return url.replace('http://www.asiaone.com/', 'http://www.asiaone.com/print/')
|
('Singapore', 'http://asiaone.feedsportal.com/c/34151/f/618415/index.rss'),
|
||||||
|
('Asia', 'http://asiaone.feedsportal.com/c/34151/f/618416/index.rss')
|
||||||
|
|
||||||
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user