mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-31 14:33:54 -04:00
38 lines
1.3 KiB
Plaintext
38 lines
1.3 KiB
Plaintext
|
|
__license__ = 'GPL v3'
|
|
__copyright__ = '2009-2010, Darko Miletic <darko.miletic at gmail.com>'
|
|
'''
|
|
beta.rs
|
|
'''
|
|
import re
|
|
from calibre.web.feeds.news import BasicNewsRecipe
|
|
|
|
|
|
class Danas(BasicNewsRecipe):
|
|
title = 'BETA'
|
|
__author__ = 'Darko Miletic'
|
|
description = 'Novinska Agencija'
|
|
publisher = 'Beta'
|
|
category = 'news, politics, Serbia'
|
|
oldest_article = 2
|
|
max_articles_per_feed = 100
|
|
no_stylesheets = False
|
|
use_embedded_content = True
|
|
language = 'sr'
|
|
publication_type = 'newsportal'
|
|
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} img{margin-bottom: 0.8em} ' # noqa
|
|
|
|
conversion_options = {
|
|
'comment': description, 'tags': category, 'publisher': publisher, 'language': language
|
|
}
|
|
|
|
preprocess_regexps = [(re.compile(u'\u0110'), lambda match: u'\u00D0')]
|
|
|
|
feeds = [
|
|
(u'Vesti dana', u'http://www.beta.rs/rssvd.asp'), (u'Ekonomija',
|
|
u'http://www.beta.rs/rssek.asp'), (u'Sport', u'http://www.beta.rs/rsssp.asp')
|
|
]
|
|
|
|
def preprocess_html(self, soup):
|
|
return self.adeify_images(soup)
|