calibre/recipes/ekantipur.recipe
Kovid Goyal 567040ee1e Perform PEP8 compliance checks on the entire codebase
Some bits of PEP 8 are turned off via setup.cfg
2016-07-29 21:25:17 +05:30

32 lines
1.5 KiB
Plaintext

from calibre.web.feeds.news import BasicNewsRecipe
class AdvancedUserRecipe1314326622(BasicNewsRecipe):
title = u'Ekantipur'
__author__ = 'Manish Bhattarai'
description = 'News from the No.1 News Portal In Nepal'
language = 'en_NP'
oldest_article = 7
max_articles_per_feed = 25
masthead_url = 'http://www.ekantipur.com/images/logo.gif'
remove_empty_feeds = True
remove_tags_before = dict(id='main-content')
remove_tags_after = dict(id='view-comments')
remove_tags = [dict(attrs={'class': ['lang fltl', 'bdtop', 'ratings', 'news-tool', 'comment', 'post-ur-comment', 'asideBox', 'commentsbox', 'related-sidebar-row related-news']}), # noqa
dict(id=['menu_container', 'top_container', 'news_container',
'top_right', 'sidebar', 'news-detail-img', 'footer-wrapper']),
dict(name=['script'])]
feeds = [
(u'Top Stories', u'http://www.ekantipur.com/en/rss/top-stories/'),
(u'National', u'http://www.ekantipur.com/en/rss/national/1'),
(u'Capital', u'http://www.ekantipur.com/en/rss/capital/7'),
(u'Business', u'http://www.ekantipur.com/en/rss/business/3'),
(u'World', u'http://www.ekantipur.com/en/rss/world/5'),
(u'Sports', u'http://www.ekantipur.com/en/rss/sports/4'),
(u'Mixed Bag', u'http://www.ekantipur.com/en/rss/mixed-bag/14'),
(u'Health & Living', u'http://www.ekantipur.com/en/rss/health-and-living/19'),
(u'Entertainment', u'http://www.ekantipur.com/en/rss/entertainment/6')]