2
Profile to download Jutarnji.hr by Valloric
7
from calibre.ebooks.lrf.web.profiles import DefaultProfile
9
class Jutarnji(DefaultProfile):
13
timefmt = ' [%d %b %Y]'
14
max_articles_per_feed = 80
15
html_description = True
18
preprocess_regexps = [
19
(re.compile(r'<body.*?<span class="vijestnaslov">', re.IGNORECASE | re.DOTALL), lambda match : '<body><span class="vijestnaslov">'),
20
(re.compile(r'</div>.*?</td>', re.IGNORECASE | re.DOTALL), lambda match : '</div></td>'),
21
(re.compile(r'<a name="addComment.*?</body>', re.IGNORECASE | re.DOTALL), lambda match : '</body>'),
22
(re.compile(r'<br>', re.IGNORECASE | re.DOTALL), lambda match : ''),
25
## Getting the print version
27
def print_version(self, url):
28
return 'http://www.jutarnji.hr/ispis_clanka.jl?artid=' + url[len(url)-9:len(url)-3]
31
## Comment out the feeds you don't want retrieved.
32
## Or add any new new RSS feed URL's here, sorted alphabetically when converted to LRF
33
## If you want one of these at the top, append a space in front of the name.
37
(' Naslovnica', 'http://www.jutarnji.hr/rss'),
38
('Sport', 'http://www.jutarnji.hr/sport/rss'),
39
('Novac', 'http://www.jutarnji.hr/novac/rss'),
40
('Kultura i zivot', 'http://www.jutarnji.hr/kultura_i_zivot/rss'),
41
('Automoto', 'http://www.jutarnji.hr/auto_moto/rss'),
42
('Hi-Tech', 'http://www.jutarnji.hr/kultura_i_zivot/hi-tech/rss'),
43
('Dom i nekretnine', 'http://www.jutarnji.hr/nekretnine/rss'),
b'\\ No newline at end of file'