diff --git a/recipes/al_ahram.recipe b/recipes/al_ahram.recipe new file mode 100644 index 0000000000..8850e82ebf --- /dev/null +++ b/recipes/al_ahram.recipe @@ -0,0 +1,62 @@ +# coding=utf-8 +__license__ = 'GPL v3' +__copyright__ = '2011, Hassan Williamson ' +''' +ahram.org.eg +''' +from calibre.web.feeds.recipes import BasicNewsRecipe + +class AlAhram(BasicNewsRecipe): + title = 'Al-Ahram' + __author__ = 'Hassan Williamson' + description = 'News from Egypt in Arabic.' + oldest_article = 7 + max_articles_per_feed = 100 + no_stylesheets = True + #delay = 1 + use_embedded_content = False + encoding = 'utf8' + publisher = 'Al-Ahram' + category = 'News' + language = 'ar' + publication_type = 'newsportal' + extra_css = ' body{ font-family: Verdana,Helvetica,Arial,sans-serif; direction: rtl; } .txtTitle{ font-weight: bold; } ' + + + keep_only_tags = [ + dict(name='div', attrs={'class':['bbcolright']}) + ] + + remove_tags = [ + dict(name='div', attrs={'class':['bbnav', 'bbsp']}), + dict(name='div', attrs={'id':['AddThisButton']}) + ] + + remove_attributes = [ + 'width','height' + ] + + feeds = [ + (u'الأولى', 'http://www.ahram.org.eg/RssXml.aspx?CategoryID=25'), + (u'مصر', 'http://www.ahram.org.eg/RssXml.aspx?CategoryID=27'), + (u'المحافظات', 'http://www.ahram.org.eg/RssXml.aspx?CategoryID=29'), + (u'الوطن العربي', 'http://www.ahram.org.eg/RssXml.aspx?CategoryID=31'), + (u'العالم', 'http://www.ahram.org.eg/RssXml.aspx?CategoryID=26'), + (u'تقارير المراسلين', 'http://www.ahram.org.eg/RssXml.aspx?CategoryID=2'), + (u'تحقيقات', 'http://www.ahram.org.eg/RssXml.aspx?CategoryID=3'), + (u'قضايا واراء', 'http://www.ahram.org.eg/RssXml.aspx?CategoryID=4'), + (u'اقتصاد', 'http://www.ahram.org.eg/RssXml.aspx?CategoryID=5'), + (u'رياضة', 'http://www.ahram.org.eg/RssXml.aspx?CategoryID=6'), + (u'حوادث', 'http://www.ahram.org.eg/RssXml.aspx?CategoryID=38'), + (u'دنيا الثقافة', 'http://www.ahram.org.eg/RssXml.aspx?CategoryID=7'), + (u'المراة والطفل', 'http://www.ahram.org.eg/RssXml.aspx?CategoryID=8'), + (u'يوم جديد', 'http://www.ahram.org.eg/RssXml.aspx?CategoryID=9'), + (u'الكتاب', 'http://www.ahram.org.eg/RssXml.aspx?CategoryID=10'), + (u'الاعمدة', 'http://www.ahram.org.eg/RssXml.aspx?CategoryID=11'), + (u'أراء حرة', 'http://www.ahram.org.eg/RssXml.aspx?CategoryID=59'), + (u'ملفات الاهرام', 'http://www.ahram.org.eg/RssXml.aspx?CategoryID=12'), + (u'بريد الاهرام', 'http://www.ahram.org.eg/RssXml.aspx?CategoryID=15'), + (u'الاخيرة', 'http://www.ahram.org.eg/RssXml.aspx?CategoryID=16'), + ] + +