mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Various Danish newspapers by Darko Miletic
This commit is contained in:
parent
d69fd87023
commit
f284a6c2b6
BIN
resources/images/news/information_dk.png
Normal file
BIN
resources/images/news/information_dk.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 343 B |
BIN
resources/images/news/jp_dk.png
Normal file
BIN
resources/images/news/jp_dk.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 609 B |
BIN
resources/images/news/politiken_dk.png
Normal file
BIN
resources/images/news/politiken_dk.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 482 B |
50
resources/recipes/information_dk.recipe
Normal file
50
resources/recipes/information_dk.recipe
Normal 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/')
|
||||||
|
|
50
resources/recipes/jp_dk.recipe
Normal file
50
resources/recipes/jp_dk.recipe
Normal 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'
|
||||||
|
|
@ -4,7 +4,7 @@ class Metro_Montreal(BasicNewsRecipe):
|
|||||||
|
|
||||||
title = u'M\xe9tro Montr\xe9al'
|
title = u'M\xe9tro Montr\xe9al'
|
||||||
__author__ = 'Jerry Clapperton'
|
__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'
|
language = 'fr'
|
||||||
|
|
||||||
oldest_article = 7
|
oldest_article = 7
|
||||||
|
@ -72,8 +72,9 @@ class Nin(BasicNewsRecipe):
|
|||||||
section = self.tag_to_string(item)
|
section = self.tag_to_string(item)
|
||||||
feedlink = self.PREFIX + item['href']
|
feedlink = self.PREFIX + item['href']
|
||||||
feedpage = self.index_to_soup(feedlink)
|
feedpage = self.index_to_soup(feedlink)
|
||||||
self.report_progress(0, _('Fetching feed')+' %s...'%(section))
|
self.report_progress(0, _('Fetching feed')+' %s...'%(section))
|
||||||
inarts = []
|
inarts = []
|
||||||
|
count2 = 0
|
||||||
for art in feedpage.findAll('span',attrs={'class':'artTitle'}):
|
for art in feedpage.findAll('span',attrs={'class':'artTitle'}):
|
||||||
alink = art.parent
|
alink = art.parent
|
||||||
url = self.PREFIX + alink['href']
|
url = self.PREFIX + alink['href']
|
||||||
|
55
resources/recipes/politiken_dk.recipe
Normal file
55
resources/recipes/politiken_dk.recipe
Normal 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'
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user