mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
dr.dk by DM
This commit is contained in:
parent
129a6fb723
commit
ca8370e19e
BIN
resources/images/news/dr_dk.png
Normal file
BIN
resources/images/news/dr_dk.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 391 B |
42
resources/recipes/dr_dk.recipe
Normal file
42
resources/recipes/dr_dk.recipe
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
__license__ = 'GPL v3'
|
||||||
|
__copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
|
||||||
|
'''
|
||||||
|
dr.dk
|
||||||
|
'''
|
||||||
|
|
||||||
|
from calibre.web.feeds.news import BasicNewsRecipe
|
||||||
|
|
||||||
|
class dr_dk(BasicNewsRecipe):
|
||||||
|
title = 'DR Nyheder'
|
||||||
|
__author__ = 'Darko Miletic'
|
||||||
|
description = 'Myndighederne indfører nu eskorte af brandbiler og ambulancer i Ishøj af frygt for hærværk.'
|
||||||
|
publisher = 'Nyhedsbureauet DR Nyheder'
|
||||||
|
category = 'news, politics, Denmark'
|
||||||
|
oldest_article = 2
|
||||||
|
max_articles_per_feed = 200
|
||||||
|
no_stylesheets = True
|
||||||
|
delay = 1
|
||||||
|
encoding = 'utf8'
|
||||||
|
use_embedded_content = False
|
||||||
|
language = 'da'
|
||||||
|
extra_css = """ body{font-family: Verdana,Arial,sans-serif }
|
||||||
|
img{margin-bottom: 0.4em}
|
||||||
|
.txtContent,.stamp{font-size: small}
|
||||||
|
"""
|
||||||
|
|
||||||
|
conversion_options = {
|
||||||
|
'comment' : description
|
||||||
|
, 'tags' : category
|
||||||
|
, 'publisher' : publisher
|
||||||
|
, 'language' : language
|
||||||
|
}
|
||||||
|
|
||||||
|
keep_only_tags = [dict(name='div', attrs={'class':'articleContent'})]
|
||||||
|
remove_attributes=['xmlns:msxsl','width','height']
|
||||||
|
|
||||||
|
feeds = [(u'All news', u'http://www.dr.dk/Nyheder/Service/feeds/Allenyheder.htm')]
|
||||||
|
|
||||||
|
def preprocess_html(self, soup):
|
||||||
|
for item in soup.findAll(style=True):
|
||||||
|
del item['style']
|
||||||
|
return soup
|
Loading…
x
Reference in New Issue
Block a user