mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Dob NeviNosti by DM. Fixes #1107941 (New recipe for serbian movie,tv blog - Doba Nevinosti)
This commit is contained in:
parent
6801bfb34d
commit
613788f536
46
recipes/dobanevinosti.recipe
Normal file
46
recipes/dobanevinosti.recipe
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
|
||||||
|
__license__ = 'GPL v3'
|
||||||
|
__copyright__ = '2013, Darko Miletic <darko.miletic at gmail.com>'
|
||||||
|
'''
|
||||||
|
dobanevinosti.blogspot.com
|
||||||
|
'''
|
||||||
|
|
||||||
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
|
class DobaNevinosti(BasicNewsRecipe):
|
||||||
|
title = 'Doba Nevinosti'
|
||||||
|
__author__ = 'Darko Miletic'
|
||||||
|
description = 'Filmski blog'
|
||||||
|
oldest_article = 15
|
||||||
|
max_articles_per_feed = 100
|
||||||
|
language = 'sr'
|
||||||
|
encoding = 'utf-8'
|
||||||
|
no_stylesheets = True
|
||||||
|
use_embedded_content = True
|
||||||
|
publication_type = 'blog'
|
||||||
|
auto_cleanup = True
|
||||||
|
extra_css = """
|
||||||
|
@font-face {font-family: "sans1";src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf)}
|
||||||
|
body{font-family: "Trebuchet MS",Trebuchet,Verdana,sans1,sans-serif}
|
||||||
|
img{margin-bottom: 0.8em; display:block;}
|
||||||
|
"""
|
||||||
|
|
||||||
|
conversion_options = {
|
||||||
|
'comment' : description
|
||||||
|
, 'tags' : 'film, blog, srbija, tv'
|
||||||
|
, 'publisher': 'Dimitrije Vojinov'
|
||||||
|
, 'language' : language
|
||||||
|
}
|
||||||
|
remove_attributes = ['lang', 'border']
|
||||||
|
preprocess_regexps = [(re.compile(u'\u0110'), lambda match: u'\u00D0')]
|
||||||
|
|
||||||
|
feeds = [(u'Tekstovi', u'http://dobanevinosti.blogspot.com/feeds/posts/default')]
|
||||||
|
|
||||||
|
def preprocess_html(self, soup):
|
||||||
|
for item in soup.findAll(style=True):
|
||||||
|
del item['style']
|
||||||
|
for item in soup.findAll('img'):
|
||||||
|
if not item.has_key('alt'):
|
||||||
|
item['alt'] = 'image'
|
||||||
|
return soup
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user