4
__copyright__ = '2009, Darko Miletic <darko.miletic at gmail.com>'
8
from calibre.web.feeds.news import BasicNewsRecipe
9
from calibre.ebooks.BeautifulSoup import Tag
11
class HLN_be(BasicNewsRecipe):
12
title = 'Het Belang Van Limburg'
13
__author__ = 'Darko Miletic'
14
description = 'News from Belgium in Dutch'
15
publisher = 'Het Belang Van Limburg'
16
category = 'news, politics, Belgium'
18
max_articles_per_feed = 100
20
use_embedded_content = False
27
'--comment' , description
28
, '--category' , category
29
, '--publisher', publisher
32
html2epub_options = 'publisher="' + publisher + '"\ncomments="' + description + '"\ntags="' + category + '"\noverride_css=" p {text-indent: 0cm; margin-top: 0em; margin-bottom: 0.5em} "'
34
keep_only_tags = [dict(name='div', attrs={'class':'art_box2'})]
36
dict(name=['embed','object'])
39
feeds = [(u'Alle nieuws', u'http://www.hln.be/rss.xml')]
41
def preprocess_html(self, soup):
42
del soup.body['onload']
43
for item in soup.findAll(style=True):
45
soup.html['lang'] = self.lang
46
soup.html['dir' ] = self.direction
47
mlang = Tag(soup,'meta',[("http-equiv","Content-Language"),("content",self.lang)])
48
mcharset = Tag(soup,'meta',[("http-equiv","Content-Type"),("content","text/html; charset=utf-8")])
49
soup.head.insert(0,mlang)
50
soup.head.insert(1,mcharset)