mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1883 (Update for recipe "Vreme")
This commit is contained in:
parent
0709d5ec76
commit
b25a0d1fec
@ -24,7 +24,7 @@ class Vreme(BasicNewsRecipe):
|
|||||||
remove_javascript = True
|
remove_javascript = True
|
||||||
use_embedded_content = False
|
use_embedded_content = False
|
||||||
language = _('Serbian')
|
language = _('Serbian')
|
||||||
extra_css = '@font-face {font-family: "serif1";src:url(res:///opt/sony/ebook/FONT/tt0011m_.ttf)} @font-face {font-family: "sans1";src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf)} body{font-family: serif1, serif} .article_description{font-family: sans1, sans-serif}'
|
extra_css = '@font-face {font-family: "serif1";src:url(res:///opt/sony/ebook/FONT/tt0011m_.ttf)} body{text-align: justify; font-family: serif1, serif} .article_description{font-family: serif1, serif}'
|
||||||
|
|
||||||
html2lrf_options = [
|
html2lrf_options = [
|
||||||
'--comment' , description
|
'--comment' , description
|
||||||
@ -33,7 +33,8 @@ class Vreme(BasicNewsRecipe):
|
|||||||
, '--ignore-tables'
|
, '--ignore-tables'
|
||||||
]
|
]
|
||||||
|
|
||||||
html2epub_options = 'publisher="' + publisher + '"\ncomments="' + description + '"\ntags="' + category + '"\nlinearize_tables=True'
|
html2epub_options = 'publisher="' + publisher + '"\ncomments="' + description + '"\ntags="' + category + '"\nlinearize_tables=True\noverride_css=" p {text-indent: 0cm; margin-top: 0em; margin-bottom: 0.5em} "'
|
||||||
|
|
||||||
|
|
||||||
preprocess_regexps = [(re.compile(u'\u0110'), lambda match: u'\u00D0')]
|
preprocess_regexps = [(re.compile(u'\u0110'), lambda match: u'\u00D0')]
|
||||||
|
|
||||||
@ -88,19 +89,12 @@ class Vreme(BasicNewsRecipe):
|
|||||||
del soup.body['text' ]
|
del soup.body['text' ]
|
||||||
del soup.body['bgcolor']
|
del soup.body['bgcolor']
|
||||||
del soup.body['onload' ]
|
del soup.body['onload' ]
|
||||||
for item in soup.findAll('table'):
|
for item in soup.findAll(face=True):
|
||||||
if item.has_key('width'):
|
del item['face']
|
||||||
del item['width']
|
for item in soup.findAll(size=True):
|
||||||
if item.has_key('height'):
|
del item['size']
|
||||||
del item['height']
|
|
||||||
mtag = '<meta http-equiv="Content-Language" content="sr-Latn-RS"/>'
|
mtag = '<meta http-equiv="Content-Language" content="sr-Latn-RS"/>'
|
||||||
soup.head.insert(0,mtag)
|
soup.head.insert(0,mtag)
|
||||||
tbl = soup.body.table
|
|
||||||
tbbb = soup.find('td')
|
|
||||||
if tbbb:
|
|
||||||
tbbb.extract()
|
|
||||||
tbl.extract()
|
|
||||||
soup.body.insert(0,tbbb)
|
|
||||||
return soup
|
return soup
|
||||||
|
|
||||||
def get_cover_url(self):
|
def get_cover_url(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user