from calibre.web.feeds.recipes import BasicNewsRecipe


class ingr(BasicNewsRecipe):
    title = 'in.gr'
    __author__ = 'Stelios'
    description = 'News from Greece'
    # max_articles_per_feed  = 100
    oldest_article = 4
    publisher = 'in.gr'
    category = 'news, GR'
    language = 'el'
    encoding = 'utf8'
    no_stylesheets = True
    use_embedded_content = False
    remove_empty_feeds = True
    keep_only_tags = [dict(name='h1'), dict(name='div', attrs={'id': ['in-news-article']})]
    remove_tags = [
        dict(name='em', attrs={'class': ['credits']}),
        dict(
            name='div',
            attrs={
                'class': [
                    'article-tools-hor',
                    'promo-banners gAds',
                    'main',
                    'article-listen-player',
                    'article-tools-hor-bttm',
                    'tools-sec',
                    'article-tools',
                    'article-listen-player-ver',
                ]
            },
        ),
    ]

    feeds = [
        ('\u0395\u03bb\u03bb\u03ac\u03b4\u03b1', 'http://rss.in.gr/feed/news/greece'),
        ('\u0395\u03b9\u03b4\u03ae\u03c3\u03b5\u03b9\u03c2', 'http://rss.in.gr/feed/news'),
        ('\u039a\u03cc\u03c3\u03bc\u03bf\u03c2', 'http://rss.in.gr/feed/news/world'),
        ('\u0395\u03c0\u03b9\u03c3\u03c4\u03ae\u03bc\u03b7', 'http://rss.in.gr/feed/news/science'),
        ('\u03a0\u03bf\u03bb\u03b9\u03c4\u03b9\u03c3\u03bc\u03cc\u03c2', 'http://rss.in.gr/feed/news/culture'),
    ]
