mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Improved recipe for HRT: Vesti
This commit is contained in:
parent
fad5a44ccf
commit
d5f369ce8b
@ -11,6 +11,8 @@ import re
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
from calibre.ebooks.BeautifulSoup import Tag
|
||||
|
||||
adfad
|
||||
|
||||
class HRT(BasicNewsRecipe):
|
||||
title = 'HRT: Vesti'
|
||||
__author__ = 'Darko Miletic'
|
||||
@ -23,7 +25,14 @@ class HRT(BasicNewsRecipe):
|
||||
language = 'hr'
|
||||
|
||||
lang = 'hr-HR'
|
||||
extra_css = '@font-face {font-family: "serif1";src:url(res:///opt/sony/ebook/FONT/tt0011m_.ttf)} body{font-family: serif1, serif} .article_description{font-family: serif1, serif}'
|
||||
extra_css = '''@font-face {font-family: "serif1";src:url(res:///opt/sony/ebook/FONT/tt0011m_.ttf)}
|
||||
body{font-family: serif1, serif} .article_description{font-family: serif1, serif}
|
||||
.news-single-timedata{color:#20558A; font-size:x-small;}
|
||||
.nsTitle{color:#20558A; font-size:large; font-weight:bold;}
|
||||
a{color:#20558A;}
|
||||
.external-link-new-window{color:#20558A;}
|
||||
|
||||
'''
|
||||
|
||||
conversion_options = {
|
||||
'comment' : description
|
||||
@ -36,6 +45,7 @@ class HRT(BasicNewsRecipe):
|
||||
|
||||
preprocess_regexps = [(re.compile(u'\u0110'), lambda match: u'\u00D0')]
|
||||
|
||||
|
||||
keep_only_tags = [dict(name='div', attrs={'class':'bigVijest'})]
|
||||
|
||||
remove_tags = [dict(name=['object','link','embed'])]
|
||||
|
@ -196,7 +196,7 @@ class InputFormatPlugin(Plugin):
|
||||
|
||||
def __call__(self, stream, options, file_ext, log,
|
||||
accelerators, output_dir):
|
||||
log('InputFormatPlugin: %s running'%self.name, end=' ')
|
||||
log('InputFormatPlugin: %s running'%self.name)
|
||||
if hasattr(stream, 'name'):
|
||||
log('on', stream.name)
|
||||
|
||||
|
@ -60,7 +60,7 @@ class RecipeInput(InputFormatPlugin):
|
||||
log.warn(
|
||||
'Downloaded recipe needs calibre version at least: %s' % \
|
||||
recipe.requires_version)
|
||||
builtin = True
|
||||
builtin = True
|
||||
except:
|
||||
log.exception('Failed to compile downloaded recipe. Falling '
|
||||
'back to builtin one')
|
||||
|
Loading…
x
Reference in New Issue
Block a user