mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1015587 (Updated recipe for 24Sata sr)
This commit is contained in:
parent
8de0c610ea
commit
8749535bd6
@ -1,6 +1,7 @@
|
|||||||
|
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
|
||||||
|
|
||||||
__license__ = 'GPL v3'
|
__license__ = 'GPL v3'
|
||||||
__copyright__ = '2009-2010, Darko Miletic <darko.miletic at gmail.com>'
|
__copyright__ = '2009-2012, Darko Miletic <darko.miletic at gmail.com>'
|
||||||
|
|
||||||
'''
|
'''
|
||||||
24sata.rs
|
24sata.rs
|
||||||
@ -21,26 +22,29 @@ class Ser24Sata(BasicNewsRecipe):
|
|||||||
encoding = 'utf-8'
|
encoding = 'utf-8'
|
||||||
use_embedded_content = False
|
use_embedded_content = False
|
||||||
language = 'sr'
|
language = 'sr'
|
||||||
publication_type = 'newspaper'
|
publication_type = 'newsportal'
|
||||||
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}
|
||||||
|
"""
|
||||||
|
|
||||||
conversion_options = {
|
conversion_options = {
|
||||||
'comment' : description
|
'comment' : description
|
||||||
, 'tags' : category
|
, 'tags' : category
|
||||||
, 'publisher' : publisher
|
, 'publisher': publisher
|
||||||
, 'language' : language
|
, 'language' : language
|
||||||
, 'linearize_tables' : True
|
|
||||||
}
|
}
|
||||||
|
|
||||||
preprocess_regexps = [(re.compile(u'\u0110'), lambda match: u'\u00D0')]
|
preprocess_regexps = [(re.compile(u'\u0110'), lambda match: u'\u00D0')]
|
||||||
|
|
||||||
feeds = [(u'Vesti Dana', u'http://www.24sata.rs/rss.php')]
|
feeds = [
|
||||||
|
(u'Vesti' , u'http://www.24sata.rs/rss/vesti.xml' ),
|
||||||
def preprocess_html(self, soup):
|
(u'Sport' , u'http://www.24sata.rs/rss/sport.xml' ),
|
||||||
return self.adeify_images(soup)
|
(u'Šou' , u'http://www.24sata.rs/rss/sou.xml' ),
|
||||||
|
(u'Specijal', u'http://www.24sata.rs/rss/specijal.xml'),
|
||||||
|
(u'Novi Sad', u'http://www.24sata.rs/rss/ns.xml' )
|
||||||
|
]
|
||||||
|
|
||||||
def print_version(self, url):
|
def print_version(self, url):
|
||||||
article = url.partition('#')[0]
|
dpart, spart, apart = url.rpartition('/')
|
||||||
article_id = article.partition('id=')[2]
|
return dpart + '/print/' + apart
|
||||||
return 'http://www.24sata.rs/_print.php?id=' + article_id
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user