Hira by thomass

This commit is contained in:
Kovid Goyal 2011-08-28 08:41:17 -06:00
parent 80638df610
commit ecabc13152

52
recipes/hira.recipe Normal file
View File

@ -0,0 +1,52 @@
# coding=utf-8
from calibre.web.feeds.recipes import BasicNewsRecipe
class Hira(BasicNewsRecipe):
title = 'Hira'
__author__ = 'thomass'
description = 'مجلة حراء مجلة علمية ثقافية فكرية تصدر كل شهرين، تعنى بالعلوم الطبيعية والإنسانية والاجتماعية وتحاور أسرار النفس البشرية وآفاق الكون الشاسعة بالمنظور القرآني الإيماني في تآلف وتناسب بين العلم والإيمان، والعقل والقلب، والفكر والواقع.'
oldest_article = 63
max_articles_per_feed = 50
no_stylesheets = True
#delay = 1
use_embedded_content = False
encoding = 'utf-8'
publisher = 'thomass'
category = 'News'
language = 'ar'
publication_type = 'magazine'
extra_css = ' .title-detail-wrap{ font-weight: bold ;text-align:right;color:#FF0000;font-size:25px}.title-detail{ font-family:sans-serif;text-align:right;} '
conversion_options = {
'tags' : category
,'language' : language
,'publisher' : publisher
,'linearize_tables': True
,'base-font-size':'10'
}
#html2lrf_options = []
keep_only_tags = [
dict(name='div', attrs={'class':['title-detail']})
]
remove_tags = [
dict(name='div', attrs={'class':['clear', 'bbsp']}),
]
remove_attributes = [
'width','height'
]
feeds = [
(u'حراء', 'http://open.dapper.net/services/hira'),
]
def preprocess_html(self, soup):
for alink in soup.findAll('a'):
if alink.string is not None:
tstr = alink.string
alink.replaceWith(tstr)
return soup