mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Hira by thomass
This commit is contained in:
parent
80638df610
commit
ecabc13152
52
recipes/hira.recipe
Normal file
52
recipes/hira.recipe
Normal 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user