Thai Rath and The Nation (Thailand) by Anat Ruangrassamee

This commit is contained in:
Kovid Goyal 2010-06-15 11:03:19 -06:00
parent ac52e4bec0
commit 6d80e2093c
3 changed files with 103 additions and 0 deletions

View File

@ -0,0 +1,58 @@
from calibre.web.feeds.news import BasicNewsRecipe
class AdvancedUserRecipe1271637235(BasicNewsRecipe):
title = u'Thairath'
__author__ = 'Anat R.'
language = 'th'
oldest_article = 7
max_articles_per_feed = 100
no_stylesheets = True
remove_javascript = True
use_embedded_content = False
feeds = [(u'News',
u'http://www.thairath.co.th/rss/news.xml'), (u'Politics',
u'http://www.thairath.co.th/rss/pol.xml'), (u'Economy',
u'http://www.thairath.co.th/rss/eco.xml'), (u'International',
u'http://www.thairath.co.th/rss/oversea.xml'), (u'Sports',
u'http://www.thairath.co.th/rss/sport.xml'), (u'Life',
u'http://www.thairath.co.th/rss/life.xml'), (u'Education',
u'http://www.thairath.co.th/rss/edu.xml'), (u'Tech',
u'http://www.thairath.co..th/rss/tech.xml'), (u'Entertainment',
u'http://www.thairath.co.th/rss/ent.xml')]
keep_only_tags = []
keep_only_tags.append(dict(name = 'h1', attrs = {'id' : 'title'}))
keep_only_tags.append(dict(name = 'ul', attrs = {'class' :
'detail-info'}))
keep_only_tags.append(dict(name = 'img', attrs = {'class' :
'detail-image'}))
keep_only_tags.append(dict(name = 'div', attrs = {'class' :
'entry'}))
remove_tags = []
remove_tags.append(dict(name = 'div', attrs = {'id':
'menu-holder'}))
remove_tags.append(dict(name = 'div', attrs = {'class':
'addthis_toolbox addthis_default_style'}))
remove_tags.append(dict(name = 'div', attrs = {'class': 'box top-item'}))
remove_tags.append(dict(name = 'div', attrs = {'class': 'column-200 column-margin-430'}))
remove_tags.append(dict(name = 'div', attrs = {'id':
'detail-related'}))
remove_tags.append(dict(name = 'div', attrs = {'id': 'related'}))
remove_tags.append(dict(name = 'id', attrs = {'class': 'footer'}))
remove_tags.append(dict(name = "ul",attrs =
{'id':'banner-highlights-images'}))

View File

@ -0,0 +1,44 @@
from calibre.web.feeds.news import BasicNewsRecipe
class AdvancedUserRecipe1271596863(BasicNewsRecipe):
title = u'The Nation'
__author__ = 'Anat R.'
language = 'en_TH'
oldest_article = 7
max_articles_per_feed = 100
no_stylesheets = True
remove_javascript = True
use_embedded_content = False
feeds = [(u'Topstory',
u'http://www.nationmultimedia.com/home/rss/topstories.rss'),
(u'National', u'http://www.nationmultimedia.com/home/rss/national.rss'),
(u'Politics',
u'http://www.nationmultimedia.com/home/rss/politics.rss'), (u'Business',
u'http://www.nationmultimedia.com/home/rss/business.rss'),
(u'Regional', u'http://www.nationmultimedia.com/home/rss/regional.rss'),
(u'Sports', u'http://www.nationmultimedia.com/home/rss/sport.rss'),
(u'Travel', u'http://www.nationmultimedia.com/home/rss/travel.rss'),
(u'Life', u'http://www.nationmultimedia.com/home/rss/life.rss')]
keep_only_tags = []
keep_only_tags.append(dict(name = 'div', attrs = {'class' :
'pd10'}))
remove_tags = []
remove_tags.append(dict(name = 'div', attrs = {'class':
'WrapperHeaderCol2-2'}))
remove_tags.append(dict(name = 'div', attrs = {'class':
'LayoutMenu2'}))
remove_tags.append(dict(name = 'div', attrs = {'class':
'TextHeaderRight'}))
remove_tags.append(dict(name = "ul",attrs = {'id':'toolZoom'}))

View File

@ -103,6 +103,7 @@ _extra_lang_codes = {
'en_TH' : _('English (Thailand)'),
'en_CY' : _('English (Cyprus)'),
'en_PK' : _('English (Pakistan)'),
'en_IL' : _('English (Israel)'),
'en_SG' : _('English (Singapore)'),
'en_YE' : _('English (Yemen)'),
'en_IE' : _('English (Ireland)'),