Various Danish newspapers by Darko Miletic

This commit is contained in:
Kovid Goyal 2010-01-29 19:26:48 -07:00
parent d69fd87023
commit f284a6c2b6
8 changed files with 158 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 609 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 482 B

View File

@ -0,0 +1,50 @@
__license__ = 'GPL v3'
__copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
'''
information.dk
'''
from calibre.web.feeds.news import BasicNewsRecipe
class Information_dk(BasicNewsRecipe):
title = 'Information - Denmark'
__author__ = 'Darko Miletic'
description = 'News from Denmark'
publisher = 'information.dk'
category = 'news, politics, Denmark'
oldest_article = 2
max_articles_per_feed = 100
no_stylesheets = True
remove_empty_feeds = True
use_embedded_content = False
encoding = 'utf8'
language = 'da'
conversion_options = {
'comment' : description
, 'tags' : category
, 'publisher': publisher
, 'language' : language
}
feeds = [
(u'Nyheder fra' , u'http://www.information.dk/feed')
,(u'Bedst lige nu' , u'http://www.information.dk/bedstligenu/feed')
,(u'Politik og internationalt' , u'http://www.information.dk/politik/feed')
,(u'Kunst og kultur' , u'http://www.information.dk/kultur/feed')
,(u'Moderne Tider' , u'http://www.information.dk/modernetider/feed')
,(u'Klima' , u'http://www.information.dk/klima/feed')
,(u'Opinion' , u'http://www.information.dk/opinion/feed')
,(u'Literatur' , u'http://www.information.dk/litteratur/feed')
,(u'Film' , u'http://www.information.dk/film/feed')
,(u'Kunst' , u'http://www.information.dk/kunst/feed')
]
remove_tags_before = dict(name='h1',attrs={'class':'print-title'})
remove_tags_after = dict(name='div',attrs={'class':'print-footer'})
remove_tags = [dict(name=['object','link'])]
def print_version(self, url):
return url.replace('information.dk/','information.dk/print/')

View File

@ -0,0 +1,50 @@
__license__ = 'GPL v3'
__copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
'''
jp.dk
'''
from calibre.web.feeds.news import BasicNewsRecipe
class JP_dk(BasicNewsRecipe):
title = 'Jyllands-Posten'
__author__ = 'Darko Miletic'
description = 'News from Denmark'
publisher = 'jp.dk'
category = 'news, politics, Denmark'
oldest_article = 2
max_articles_per_feed = 100
no_stylesheets = True
use_embedded_content = False
encoding = 'cp1252'
language = 'da'
extra_css = ' body{font-family: Arial,Verdana,Helvetica,Geneva,sans-serif } h1{font-family: Times,Georgia,Verdana,serif } '
conversion_options = {
'comment' : description
, 'tags' : category
, 'publisher': publisher
, 'language' : language
}
feeds = [
(u'Tophistorier', u'http://www.jp.dk/rss/topnyheder.jsp')
,(u'Seneste nyt' , u'http://jp.dk/index.jsp?service=rssfeed&submode=seneste')
,(u'Indland' , u'http://www.jp.dk/rss/indland.jsp')
,(u'Udland' , u'http://www.jp.dk/rss/udland.jsp')
,(u'Ny viden' , u'http://www.jp.dk/rss/nyviden.jsp')
,(u'Timeout' , u'http://www.jp.dk/rss/timeout.jsp')
,(u'Kultur' , u'http://www.jp.dk/rss/kultur.jsp')
,(u'Sport' , u'http://www.jp.dk/rss/sport.jsp')
]
remove_tags = [
dict(name=['object','link'])
,dict(name='p',attrs={'class':'artByline'})
]
def print_version(self, url):
return url + '?service=printversion'

View File

@ -4,7 +4,7 @@ class Metro_Montreal(BasicNewsRecipe):
title = u'M\xe9tro Montr\xe9al'
__author__ = 'Jerry Clapperton'
description = 'Le quotidien le plus branché sur le monde'
description = u'Le quotidien le plus branch\xe9 sur le monde'
language = 'fr'
oldest_article = 7

View File

@ -74,6 +74,7 @@ class Nin(BasicNewsRecipe):
feedpage = self.index_to_soup(feedlink)
self.report_progress(0, _('Fetching feed')+' %s...'%(section))
inarts = []
count2 = 0
for art in feedpage.findAll('span',attrs={'class':'artTitle'}):
alink = art.parent
url = self.PREFIX + alink['href']

View File

@ -0,0 +1,55 @@
__license__ = 'GPL v3'
__copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
'''
politiken.dk
'''
from calibre.web.feeds.news import BasicNewsRecipe
class Politiken_dk(BasicNewsRecipe):
title = 'Politiken.dk'
__author__ = 'Darko Miletic'
description = 'News from Denmark'
publisher = 'politiken.dk'
category = 'news, politics, Denmark'
oldest_article = 2
max_articles_per_feed = 100
no_stylesheets = True
remove_empty_feeds = True
use_embedded_content = False
encoding = 'cp1252'
language = 'da'
extra_css = ' body{font-family: Arial,Helvetica,sans-serif } h1{font-family: Georgia,"Times New Roman",Times,serif } '
conversion_options = {
'comment' : description
, 'tags' : category
, 'publisher': publisher
, 'language' : language
}
feeds = [
(u'Tophistorier' , u'http://politiken.dk/rss/tophistorier.rss')
,(u'Seneste nyt' , u'http://politiken.dk/rss/senestenyt.rss')
,(u'Mest laeste' , u'http://politiken.dk/rss/mestlaeste.rss')
,(u'Danmark' , u'http://politiken.dk/rss/indland.rss')
,(u'Politik' , u'http://politiken.dk/rss/politik.rss')
,(u'Klima' , u'http://politiken.dk/rss/klima.rss')
,(u'Internationalt' , u'http://politiken.dk/rss/udland.rss')
,(u'Erhverv' , u'http://politiken.dk/rss/erhverv.rss')
,(u'Kultur' , u'http://politiken.dk/rss/kultur.rss')
,(u'Sport' , u'http://politiken.dk/rss/sport.rss')
,(u'Uddannelse' , u'http://politiken.dk/rss/uddannelse.rss')
,(u'Videnskab' , u'http://politiken.dk/rss/videnskab.rss')
]
remove_tags_before = dict(name='h1')
remove_tags = [
dict(name=['object','link'])
,dict(name='div',attrs={'class':'footer'})
]
def print_version(self, url):
return url + '?service=print'