# coding=utf-8
__license__ = 'GPL v3'
__copyright__ = '2011-2016, Hassan Williamson <haz at hazrpg.co.uk>'
'''
ahram.org.eg
'''
from calibre.web.feeds.recipes import BasicNewsRecipe


class AlAhram(BasicNewsRecipe):
    title = u'Al-Ahram (الأهرام)'
    __author__ = 'Hassan Williamson'
    description = 'The Arabic version of the Al-Ahram newspaper.'
    language = 'ar'
    encoding = 'utf8'
    cover_url = 'http://www.ahram.org.eg/Media/News/2015/3/14/2015-635619650946000713-600.jpg'
    oldest_article = 7
    max_articles_per_feed = 100
    no_stylesheets = True
    use_embedded_content = False
    publisher = 'Al-Ahram'
    category = 'News'
    publication_type = 'newsportal'

    extra_css = ' body{ font-family: Verdana,Helvetica,Arial,sans-serif; direction: rtl; } .bbtitle{ font-weight: bold; font-size: 2em; } .bbsubtitle{ font-size: 1.3em; } #WriterImage{ height: 10px; } '  # noqa

    keep_only_tags = [
        dict(name='div', attrs={'class': ['bbcolright']})
    ]

    remove_tags = [
        dict(name='div', attrs={'class': ['bbnav', 'bbsp']}),
        dict(name='div', attrs={'id': ['AddThisButton']}),
        dict(name='a', attrs={'class': ['twitter-share-button']}),
        dict(name='div', attrs={'id': ['ReaderCount']}),
    ]

    remove_attributes = [
        'width', 'height', 'style'
    ]

    feeds = [
        (u'الأولى', 'http://www.ahram.org.eg/archive/RssXml.aspx?CategoryID=25'),
        (u'الصفحة الثانية',
         'http://www.ahram.org.eg/archive/RssXml.aspx?CategoryID=74'),
        (u'مصر', 'http://www.ahram.org.eg/archive/RssXml.aspx?CategoryID=27'),
        (u'المشهد السياسي',
         'http://www.ahram.org.eg/archive/RssXml.aspx?CategoryID=60'),
        (u'المحافظات', 'http://www.ahram.org.eg/archive/RssXml.aspx?CategoryID=29'),
        (u'الوطن العربي',
         'http://www.ahram.org.eg/archive/RssXml.aspx?CategoryID=31'),
        (u'العالم', 'http://www.ahram.org.eg/archive/RssXml.aspx?CategoryID=26'),
        (u'تقارير المراسلين',
         'http://www.ahram.org.eg/archive/RssXml.aspx?CategoryID=2'),
        (u'تحقيقات', 'http://www.ahram.org.eg/archive/RssXml.aspx?CategoryID=3'),
        (u'قضايا واراء',
         'http://www.ahram.org.eg/archive/RssXml.aspx?CategoryID=4'),
        (u'اقتصاد', 'http://www.ahram.org.eg/archive/RssXml.aspx?CategoryID=5'),
        (u'رياضة', 'http://www.ahram.org.eg/archive/RssXml.aspx?CategoryID=6'),
        (u'حوادث', 'http://www.ahram.org.eg/archive/RssXml.aspx?CategoryID=38'),
        (u'دنيا الثقافة',
         'http://www.ahram.org.eg/archive/RssXml.aspx?CategoryID=7'),
        (u'المراة والطفل',
         'http://www.ahram.org.eg/archive/RssXml.aspx?CategoryID=8'),
        (u'يوم جديد', 'http://www.ahram.org.eg/archive/RssXml.aspx?CategoryID=9'),
        (u'الكتاب', 'http://www.ahram.org.eg/archive/RssXml.aspx?CategoryID=10'),
        (u'الاعمدة', 'http://www.ahram.org.eg/archive/RssXml.aspx?CategoryID=11'),
        (u'أراء حرة', 'http://www.ahram.org.eg/archive/RssXml.aspx?CategoryID=59'),
        (u'ملفات الاهرام',
         'http://www.ahram.org.eg/archive/RssXml.aspx?CategoryID=12'),
        (u'بريد الاهرام',
         'http://www.ahram.org.eg/archive/RssXml.aspx?CategoryID=15'),
        (u'برلمان الثورة',
         'http://www.ahram.org.eg/archive/RssXml.aspx?CategoryID=61'),
        (u'الاخيرة', 'http://www.ahram.org.eg/archive/RssXml.aspx?CategoryID=16'),
    ]
