from __future__ import with_statement
__license__ = 'GPL 3'
__copyright__ = '2014, Amit <amitkp.ias@gmail.com>'

from calibre.web.feeds.news import BasicNewsRecipe


class My_Feeds(BasicNewsRecipe):
    title = 'Down To Earth'
    language = 'en_IN'
    oldest_article = 20
    __author__ = 'Amit'
    max_articles_per_feed = 100
    no_stylesheets = True
    remove_javascript = True
    center_navbar = True
    use_embedded_content = False
    remove_empty_feeds = True
    remove_tags_before = dict(name='div', id='PageContent')
    remove_tags_after = [dict(name='div'), {'class': 'taxonomy-terms'}]
    remove_tags = [
        dict(id=['comments', 'breadcrumb', 'node_related_stories']),
        dict(attrs={'class': ['commentCount', 'box']})
    ]

    feeds = [
        (u'editor', u'http://www.downtoearth.org.in/taxonomy/term/20348/0/feed'),
        (u'cover story', u'http://www.downtoearth.org.in/taxonomy/term/20345/0/feed'),
        (u'special report', u'http://www.downtoearth.org.in/taxonomy/term/20384/0/feed'),
        (u'features', u'http://www.downtoearth.org.in/taxonomy/term/20350/0/feed'),
        (u'news', u'http://www.downtoearth.org.in/taxonomy/term/20366/0/feed'),
        (u'debate', u'http://www.downtoearth.org.in/taxonomy/term/20347/0/feed'),
        (u'natural disasters', u'http://www.downtoearth.org.in/taxonomy/term/20822/0/feed')
    ]
