from calibre.web.feeds.recipes import BasicNewsRecipe


class newsbeast(BasicNewsRecipe):
    title = 'Newsbeast'
    __author__ = 'Stelios'
    description = 'News from Greece'
    oldest_article = 2
    max_articles_per_feed = 100
    publisher = 'newsbeast'
    category = 'news, GR'
    language = 'el'
    encoding = 'utf8'
    no_stylesheets = True
    use_embedded_content = False
    remove_empty_feeds = True
    encoding = 'utf8'
    keep_only_tags = [
        dict(name='div', attrs={'class': ['article-title']}),
        # dict(name='img', attrs={'class' : ['article_photo']}),
        # If enabled feeds exceede 15MB
        dict(name='div', attrs={'class': ['txt']})
    ]
    remove_tags = [
        dict(name='table', attrs={'id': ['artFoot']}),
        dict(name='img'),
        # If removed feeds exceede 15MB
        dict(name='p', attrs={'class': ['article-details']})
    ]

    feeds = [
        (u'\u0395\u03BB\u03BB\u03AC\u03B4\u03B1',
         'http://www.newsbeast.gr/feeds/greece'),
        (u'\u039A\u03CC\u03C3\u03BC\u03BF\u03C2',
         'http://www.newsbeast.gr/feeds/world'),
        (u'\u03A0\u03BF\u03BB\u03B9\u03C4\u03B9\u03BA\u03AE',
         'http://www.newsbeast.gr/feeds/politiki'),
        (u'\u039F\u03B9\u03BA\u03BF\u03BD\u03BF\u03BC\u03AF\u03B1',
         'http://www.newsbeast.gr/feeds/financial'),
        (u'\u0391\u03B8\u03BB\u03B7\u03C4\u03B9\u03BA\u03AC',
         'http://www.newsbeast.gr/feeds/sports'),
        (u'\u039A\u03BF\u03B9\u03BD\u03C9\u03BD\u03AF\u03B1',
         'http://www.newsbeast.gr/feeds/society'),
        (u'\u03A0\u03B5\u03C1\u03B9\u03B2\u03AC\u03BB\u03BB\u03BF\u03BD',
         'http://www.newsbeast.gr/feeds/environment'),
        (u'Media', 'http://www.newsbeast.gr/feeds/media'),
        (u'\u0394\u03B9\u03B1\u03C3\u03BA\u03AD\u03B4\u03B1\u03C3\u03B7',
         'http://www.newsbeast.gr/feeds/entertainment'),
        (u'Lifestyle', 'http://www.newsbeast.gr/feeds/lifestyle'),
        (u'\u03A4\u03B5\u03C7\u03BD\u03BF\u03BB\u03BF\u03B3\u03AF\u03B1',
         'http://www.newsbeast.gr/feeds/technology'),
        (u'\u0391\u03C5\u03C4\u03BF\u03BA\u03AF\u03BD\u03B7\u03C4\u03BF',
         'http://www.newsbeast.gr/feeds/car'),
        (u'\u0393\u03C5\u03BD\u03B1\u03AF\u03BA\u03B1',
         'http://www.newsbeast.gr/feeds/woman'),
        (u'\u03A5\u03B3\u03B5\u03AF\u03B1', 'http://www.newsbeast.gr/feeds/health'),
        (u'\u03A0\u03BF\u03BB\u03B9\u03C4\u03B9\u03C3\u03BC\u03CC\u03C2',
         'http://www.newsbeast.gr/feeds/culture'),
        (u'\u038C,\u03C4\u03B9 \u03BD\u03B1 \u03BD\u03B1\u03B9',
         'http://www.newsbeast.gr/feeds/weird')
    ]
